index.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 class="words">5、如果下面视频中出现黑屏,摄像头可能被其他进程占用,请关闭其他调用摄像头的程序,重新刷新当前页面重新拍照识别。</view>
  15. </view>
  16. <view class="take_photo" @click="toTakePhoto()">
  17. 去拍照
  18. </view>
  19. </view>
  20. </u-popup>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. name: 'popup',
  26. props: {
  27. popupPhotoShow: {
  28. type: Boolean,
  29. default: false
  30. }
  31. },
  32. data() {
  33. return {
  34. // popupShow: false
  35. }
  36. },
  37. methods: {
  38. toTakePhoto() {
  39. this.$emit('takePhoto', true)
  40. },
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .popup_box {
  46. width: 100%;
  47. height: 1100rpx;
  48. display: flex;
  49. align-items: center;
  50. flex-direction: column;
  51. padding: 0rpx 40rpx;
  52. .photo_head {
  53. width: 240rpx;
  54. height: 240rpx;
  55. margin: 80rpx 0rpx 48rpx;
  56. }
  57. .warn {
  58. width: 100%;
  59. font-size: 36rpx;
  60. font-weight: bold;
  61. color: #222222;
  62. margin-bottom: 40rpx;
  63. }
  64. .words {
  65. font-size: 28rpx;
  66. color: #666666;
  67. line-height: 33rpx;
  68. margin-bottom: 24rpx;
  69. }
  70. .take_photo {
  71. width: 412rpx;
  72. height: 84rpx;
  73. line-height: 84rpx;
  74. text-align: center;
  75. background: #01C65A;
  76. border-radius: 16rpx;
  77. font-size: 36rpx;
  78. font-weight: 500;
  79. color: #FFFFFF;
  80. margin-top: 100rpx;
  81. }
  82. }
  83. </style>