index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="popup">
  3. <u-popup v-model="popupPhotoShow" mode="bottom" border-radius="30" :mask-close-able='false'>
  4. <view class="popup_box">
  5. <view class="head">
  6. <image src="/static/learn/photo_head.png" class="photo_head"></image>
  7. </view>
  8. <view class="warn">温馨提示</view>
  9. <view class="contents">
  10. <view class="words">1、请保证摄像头正对自己,避免头像偏左或者偏右。</view>
  11. <view class="words">2、请保证拍照环境光线充足(照片太暗或曝光会降低验证通过率)。</view>
  12. <view class="words">3、请保证整个头像在人脸识别区域内,脸部无遮挡装饰物(佩戴眼镜会降低通过率)。</view>
  13. <view class="words">4、如果下面视频中出现黑屏,摄像头可能被其他进程占用,请关闭其他调用摄像头的程序,重新刷新当前页面重新拍照识别。</view>
  14. </view>
  15. <view class="take_photo" @click="toTakePhoto()">
  16. 去拍照
  17. </view>
  18. </view>
  19. </u-popup>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. name: 'popup',
  25. props: {
  26. popupPhotoShow: {
  27. type: Boolean,
  28. default: false
  29. }
  30. },
  31. data() {
  32. return {
  33. // popupShow: false
  34. }
  35. },
  36. methods: {
  37. toTakePhoto() {
  38. this.$emit('takePhoto', true)
  39. },
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. .popup_box {
  45. width: 100%;
  46. height: 1100rpx;
  47. display: flex;
  48. align-items: center;
  49. flex-direction: column;
  50. padding: 0rpx 40rpx;
  51. .photo_head {
  52. width: 240rpx;
  53. height: 240rpx;
  54. margin: 80rpx 0rpx 48rpx;
  55. }
  56. .warn {
  57. width: 100%;
  58. font-size: 36rpx;
  59. font-weight: bold;
  60. color: #222222;
  61. margin-bottom: 40rpx;
  62. }
  63. .words {
  64. font-size: 28rpx;
  65. color: #666666;
  66. line-height: 33rpx;
  67. margin-bottom: 24rpx;
  68. }
  69. .take_photo {
  70. width: 412rpx;
  71. height: 84rpx;
  72. line-height: 84rpx;
  73. text-align: center;
  74. background: #01C65A;
  75. border-radius: 16rpx;
  76. font-size: 36rpx;
  77. font-weight: 500;
  78. color: #FFFFFF;
  79. margin-top: 100rpx;
  80. }
  81. }
  82. </style>