camera.wxml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <cover-view class="lary-top" style="height:{{info.statusBarHeight}}px;"></cover-view>
  2. <camera class="camera-photo" frame-size="small" device-position="{{devBack}}" flash="off" binderror="error" style="width:{{info.windowWidth}}px;height:{{info.windowHeight}}px;top:{{info.statusBarHeight-200}}px">
  3. <cover-view class="page-flex" style="width:{{info.windowWidth}}px; height:{{info.windowHeight}}px;">
  4. <cover-view style="height:{{info.windowHeight}}px;" class="page-mask page-mask-lr"></cover-view>
  5. <cover-view class="page-content" style="height:{{info.windowHeight}}px;">
  6. <cover-view class="page-mask" style="height:{{convasY-40}}px;"></cover-view>
  7. <cover-view style="width:{{canvasWidth}}px; height:{{canvasHeight}}px;margin:auto"></cover-view>
  8. <cover-view class="page-mask tackPhoto" style="height:{{convasY+40}}px">
  9. <cover-view class="confirm-photo" bindtap="takePhoto">确定</cover-view>
  10. <cover-view bindtap="cancelPhoto" class="cancel">取消</cover-view>
  11. </cover-view>
  12. </cover-view>
  13. <cover-view style="height:{{info.windowHeight}}px;" class="page-mask page-mask-lr"></cover-view>
  14. </cover-view>
  15. <cover-view class="id-card">
  16. 请拍摄身份证
  17. <cover-view class="id-card-text">人像面</cover-view>
  18. </cover-view>
  19. </camera>
  20. <canvas wx:if="{{isCanvas}}" class="canvas-style" canvas-id="myCanvas" style="width:{{canvasWidth}}px; height:{{canvasHeight}}px;"></canvas>
  21. <cover-image wx:if="{{isBaseImg}}" class="base-img" mode="aspectFit" style="width:{{info.windowWidth}}px;height:{{info.windowHeight}}px;top:{{info.statusBarHeight}}px" src="{{baseImg}}"></cover-image>
  22. <cover-view wx:if="{{isSuccess}}" style="width:{{info.windowWidth}}px;height:{{info.windowHeight}}px;top:{{info.statusBarHeight}}px;" class="success-img">
  23. <cover-image style="width:{{canvasWidth}}px; height:{{canvasHeight}}px;margin:{{convasY-40}}px auto;" src="{{srcCanvasPath}}"></cover-image>
  24. <cover-view class="after-img-tips" style="color:#fff">
  25. <!-- 取消绘制,重新绘制 -->
  26. <!-- <cover-image class="back" src="../../../assets/back.png" catchtap="clearPhoto"></cover-image> -->
  27. <cover-view class="back" catchtap="clearPhoto">重新绘制</cover-view>
  28. <!-- 确定绘制,返回到相应的页面,或者隐藏camera组件 -->
  29. <!-- <cover-image class="back" src="../../../assets/icon_05-min.png" catchtap="confirmBack"></cover-image> -->
  30. <cover-view class="back" catchtap="confirmBack">绘制完成</cover-view>
  31. </cover-view>
  32. </cover-view>
  33. <image-cropper id="image-cropper" limit_move="{{true}}" disable_rotate="{{true}}" width="{{width}}" height="{{height}}" imgSrc="{{src}}" bindload="cropperload" bindimageload="loadimage" bindtapcut="clickcut"></image-cropper>