authentication.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="">
  3. <view class="margin-top padding margin" style="background: #FFFFFF; border-radius: 20upx;">
  4. <view class="title">基本信息</view>
  5. <view style="margin-top: 20rpx;">
  6. 姓名
  7. </view>
  8. <view class="flex"
  9. style="margin: 20rpx 0; padding: 20rpx;border-radius: 11rpx; border: 1px #ccc solid;">
  10. <input class="uni-input" style="width: 90%;" placeholder="请输入真是姓名" />
  11. <image v-if="globalImages" :src="globalImages + 'images/cuo.png'" style="width: 44rpx;height: 44rpx;margin-left: 15rpx;"
  12. mode=""></image>
  13. </view>
  14. <view style="margin-top: 20rpx;">
  15. 身份证号码
  16. </view>
  17. <view class="flex"
  18. style="margin: 20rpx 0; padding: 20rpx;border-radius: 11rpx; border: 1px #ccc solid;">
  19. <input class="uni-input" type="number" style="width: 90%;" placeholder="请输入身份证号码" />
  20. <image v-if="globalImages" :src="globalImages + 'images/cuo.png'" style="width: 44rpx;height: 44rpx;margin-left: 15rpx;"
  21. mode=""></image>
  22. </view>
  23. <view style="color: #ccc;font-size: 24rpx;">
  24. 请确保信息准确有效
  25. </view>
  26. <view class="title" style="margin-top: 30rpx;">人脸识别</view>
  27. <view style="text-align: center;">
  28. <view class="parent-container">
  29. <view style="width: 300rpx; height: 300rpx; border-radius: 150rpx; background: #b2b2b0; margin-top: 30rpx;"></view>
  30. </view>
  31. <button type="primary" style="background: #00c18a; margin-top: 50rpx;" size="mini" class="feedback-submit">开始验证</button>
  32. <view style="margin-top: 15rpx;">
  33. 请正对摄像头,确保光线充足
  34. </view>
  35. </view>
  36. </view>
  37. <view class="margin-top padding margin" style="background: #FFFFFF; border-radius: 20upx;">
  38. <view class="title">车辆信息</view>
  39. <view style="margin-top: 20rpx;">
  40. 行驶证照片
  41. </view>
  42. <view style="width: 100%;margin-top: 20rpx;padding: 30rpx;">
  43. <view @click="addImages(1)"
  44. v-if="!form.frontIdentityCard">
  45. <image src="../../static/upload/czsfzrx.png" style="width: 100%;"></image>
  46. </view>
  47. <image @click="disabled? '':addImages(1)" v-else :src="form.frontIdentityCard"
  48. style="width: 100%;"></image>
  49. </view>
  50. <view style="margin-top: 20rpx;">
  51. 车辆照片
  52. </view>
  53. <view style="width: 100%;margin-top: 20rpx;padding: 30rpx;">
  54. <view @click="addImages(2)"
  55. v-if="!form.backIdentityCard">
  56. <image src="../../static/upload/czsfzfm.png" style="width: 100%;"></image>
  57. </view>
  58. <image @click="disabled? '':addImages(2)" v-else :src="form.backIdentityCard"
  59. style="width: 100%;"></image>
  60. </view>
  61. </view>
  62. <view class=" margin-top footer text-xxl flex align-center" style="font-size: 24rpx; padding: 0 30rpx;">
  63. <text @tap="isShowAgree" class="cuIcon" :class="showAgree?'cuIcon-radiobox':'cuIcon-round'">同意并接受</text>
  64. <!-- 协议地址 -->
  65. <navigator url="/my/setting/sijixieyi" style="color: #00c18a;" open-type="navigate">《司机代驾服务用户协议 》</navigator>
  66. </view>
  67. <view class="login_btn">开始验证</view>
  68. </view>
  69. </template>
  70. <script>
  71. import { waitForGlobalImages } from '@/utils/globalImageLoader'
  72. export default {
  73. data() {
  74. return {
  75. selectedModule: 'douyin',
  76. globalImages: ''
  77. }
  78. },
  79. onLoad() {
  80. waitForGlobalImages().then((path) => {
  81. console.log('✅ 全局图片路径:', path)
  82. this.globalImages = path
  83. })
  84. },
  85. methods: {
  86. selectModule(module) {
  87. this.selectedModule = module;
  88. },
  89. addImages(e) {
  90. uni.chooseImage({
  91. count: 1,
  92. sourceType: ['album', 'camera'],
  93. success: res => {
  94. for (let i = 0; i < 1; i++) {
  95. this.$queue.showLoading("上传中...");
  96. uni.uploadFile({ // 上传接口
  97. // url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  98. url: 'https://shunfengcheshop.xianmxkj.com/sqx_fast/alioss/upload',
  99. filePath: res.tempFilePaths[i],
  100. name: 'file',
  101. success: (uploadFileRes) => {
  102. console.log(uploadFileRes)
  103. if (e == 1) {
  104. this.form.frontIdentityCard = JSON.parse(uploadFileRes
  105. .data).data
  106. } else if (e == 2) {
  107. this.form.backIdentityCard = JSON.parse(uploadFileRes
  108. .data).data
  109. } else if (e == 3) {
  110. this.form.drivingLicense = JSON.parse(uploadFileRes
  111. .data).data
  112. } else if(e == 4){
  113. this.form.driverLicense = JSON.parse(uploadFileRes
  114. .data).data
  115. }
  116. uni.hideLoading();
  117. }
  118. });
  119. }
  120. }
  121. })
  122. },
  123. },
  124. mounted() {
  125. }
  126. }
  127. </script>
  128. <style scoped>
  129. .title {
  130. font-size: 33rpx;
  131. font-family: PingFang SC;
  132. color: #333333;
  133. }
  134. .login_btn {
  135. width: calc(100% - 60rpx);
  136. margin: 30rpx auto;
  137. text-align: center;
  138. background: #00c18a;
  139. height: 80rpx;
  140. border-radius: 16rpx;
  141. color: #ffffff;
  142. line-height: 80rpx;
  143. }
  144. .parent-container {
  145. display: flex;
  146. justify-content: center;
  147. align-items: center;
  148. position: relative;
  149. }
  150. </style>