index.wxml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <view class="container" style="opacity:{{loadCompele?1:0}}">
  2. <view class="c_top" style="--left: {{left+'px'}};--bottom: {{isIphoneX?'68rpx':'0'}};--top: {{top.top+'px'}};--h: {{top.height+'px'}};">
  3. <view bindtap="back" wx:if="{{!(!isSelect&&currentImg)}}">
  4. <view class='icon'>
  5. <text class="iconfont iconfanhui" />
  6. </view>
  7. </view>
  8. </view>
  9. <view class="c_cam">
  10. <camera wx:if="{{!currentImg}}" device-position="{{isBackCamera?'back':'front'}}" flash="off" binderror="error" ></camera>
  11. <image wx:else src="{{currentImg}}" mode="aspectFit" />
  12. <image bindload="loadcompele" class="mask" wx:if="{{!isSelect}}" mode="widthFix" src="{{cdn_url}}/images/mask/{{current}}.png" />
  13. </view>
  14. <view class="c_bottom">
  15. <text wx:if="{{!currentImg}}">请正对摄像头拍照</text>
  16. <view class="c_btn" wx:if="{{!currentImg}}">
  17. <view class="preview">
  18. <text wx:if="{{!currentImg}}" bindtap="selectImage" class="iconfont iconzhaopian" />
  19. <image wx:else src="{{currentImg}}" mode="aspectFit" />
  20. <text class='txt'>相册选择</text>
  21. </view>
  22. <text bindtap="takePhoto" class="take_photo iconfont iconpaizhao" />
  23. <view class="changePos">
  24. <text bindtap="changPosition" class="iconfont iconfanzhuanxiangji1" />
  25. <text class='txt'>翻转镜头</text>
  26. </view>
  27. </view>
  28. <view class="handle_img" style="--bottom: {{isIphoneX?'68rpx':'0'}};" wx:else>
  29. <text bindtap="reTake">{{!isSelect?'重拍':''}}</text>
  30. <text bindtap="submit">使用图片</text>
  31. </view>
  32. </view>
  33. <toast id="loading-toast"/>
  34. <toast id="tips-toast"/>
  35. <toast id="fail-toast"/>
  36. </view>