工行这里学车报名流程h5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
2.7 KiB

  1. <template>
  2. <view class="main">
  3. <view class="h1">
  4. 报名驾校前
  5. </view>
  6. <view class="tit">
  7. 请按提示完成实名认证
  8. </view>
  9. <view class="iconImg">
  10. <image src="../../../static/images/icon/weishiming@2x.png" mode="widthFix"></image>
  11. </view>
  12. <view class="blueTxt">
  13. 手持身份证准备拍摄并保持光线充足和网络良好
  14. </view>
  15. <view class="btn" @click="start">
  16. 点击开始实名认证
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import utilsApi from '@/api/utils.js'
  22. // #ifdef APP-PLUS
  23. const plug=uni.requireNativePlugin("Html5app-AliyunFaceVerify");
  24. // #endif
  25. export default {
  26. data() {
  27. return {
  28. checked: true,
  29. verifyToken: '',
  30. timer: null
  31. }
  32. },
  33. onLoad(options) {
  34. this.trainingApplyId = options.trainingApplyId
  35. // this.timer = setInterval(()=>{
  36. // this.getVerifyResultFn()
  37. // },3000)
  38. },
  39. onHide() {
  40. clearInterval(this.timer)
  41. },
  42. onUnload() {
  43. clearInterval(this.timer)
  44. },
  45. methods: {
  46. async getVerifyTokenFn(trainingApplyId) {
  47. let _this = this
  48. const [nulls, res] = await utilsApi.getVerifyToken({trainingApplyId: this.trainingApplyId})
  49. console.log('实名token')
  50. console.log(res.data)
  51. // #ifdef APP-PLUS
  52. console.log('****************')
  53. try{
  54. plug.RPManual({"verifyToken":res.data},ret=>{
  55. if(ret.code==1) {
  56. // 实名认证成功
  57. // getApp().globalData.realAuthsuccee = true
  58. uni.$emit('isRealAuthsucceeFn')
  59. _this.$store.commit('upDateRealAuthsuccee', true)
  60. clearInterval(_this.timer)
  61. uni.navigateBack()
  62. }
  63. console.log(ret)
  64. });
  65. }catch(e){
  66. console.log(e)
  67. }
  68. // #endif
  69. },
  70. // 检查实名认证结果
  71. async getVerifyResultFn() {
  72. const [nulls, res] = await utilsApi.getVerifyResult({trainingApplyId: this.trainingApplyId})
  73. if(res.data&&res.data.verifyStatus==1) {
  74. uni.showToast({
  75. title: '实名认证成功'
  76. })
  77. uni.navigateBack()
  78. }
  79. console.log(res)
  80. },
  81. start() {
  82. this.getVerifyTokenFn()
  83. },
  84. },
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .main {
  89. width: 100%;
  90. display: flex;
  91. flex-direction: column;
  92. justify-content: center;
  93. text-align: center;
  94. padding: 0 60rpx;
  95. background-color: #fff;
  96. .h1 {
  97. font-size: 26rpx;
  98. line-height: 100rpx;
  99. color: #333;
  100. text-align: center;
  101. }
  102. .tit {
  103. font-size: 36rpx;
  104. font-weight: 700;
  105. }
  106. .iconImg {
  107. width: 90%;
  108. margin-top: 30rpx;
  109. image {
  110. }
  111. }
  112. .blueTxt {
  113. font-size: 28rpx;
  114. color: $themC;
  115. padding: 30rpx 0 60rpx 0;
  116. }
  117. .btn {
  118. width: 100%;
  119. text-align: center;
  120. line-height: 96rpx;
  121. background-color: $themC;
  122. color: #fff;
  123. height: 96rpx;
  124. border-radius: 8rpx;
  125. }
  126. }
  127. </style>