学员端小程序
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.

193 lines
5.2 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="学员报名"></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <view class="row">
  7. <view class="lab">证件类型</view>
  8. <view class="rightCon">
  9. <view class="val" @click="showType=true">
  10. <input v-model="form.typeName" placeholder="请选择" class="input1" style="pointer-events: none;" disabled/></input>
  11. </view>
  12. <view class="icon">
  13. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="row" v-if="form.value==7">
  18. <view class="lab">国籍</view>
  19. <view class="rightCon">
  20. <view class="val">
  21. <input v-model="form.classModel" placeholder="请选择" @click="showType=true" disabled/></input>
  22. </view>
  23. <view class="icon">
  24. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="row" v-if="form.value!=1">
  29. <view class="lab">证件号码</view>
  30. <view class="rightCon">
  31. <view class="val">
  32. <input v-model="form.a" placeholder="请输入" /></input>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="card">
  38. <view class="row">
  39. <view class="lab">实名认证</view>
  40. <view class="rightCon">
  41. <view class="val" v-if="vuex_userInfo.applyStep>1" style="color: #1989FA;">已认证</view>
  42. <view class="val" v-else>待认证</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="btnBg" @click="goNext">下一步</view>
  47. </view>
  48. <u-picker :show="showType" :columns="typeArr" keyName="label" @confirm="confirmType" @cancel="showType=false"></u-picker>
  49. </view>
  50. </template>
  51. <script>
  52. import { getpersonface, GetDetectInfoEnhanced, getCardType } from '@/config/api.js'
  53. export default {
  54. data() {
  55. return {
  56. form: {
  57. value: 1,
  58. typeName: '身份证'
  59. },
  60. showType: false,
  61. typeArr: [],
  62. }
  63. // 报名进度(0:待报名,1:已选驾校,2:已实名制,3:已填写报名信息,4:已签署合同,5:待支付,6:已支付)
  64. },
  65. onLoad() {
  66. // this.GetDetectInfoEnhancedFn()
  67. this.getCardTypeFn()
  68. },
  69. methods: {
  70. // 获取证件类型
  71. async getCardTypeFn() {
  72. const {data: res} = await getCardType()
  73. this.typeArr = [res]
  74. await this.$store.dispatch('getUserInfo')
  75. if(this.vuex_userInfo.applyStep>1) {
  76. res.forEach(item=>{
  77. if(item.value==this.vuex_userInfo.cardType ){
  78. this.form.typeName = item.label
  79. }
  80. })
  81. }
  82. console.log(res)
  83. },
  84. confirmType(val) {
  85. let item = val.value[0]
  86. console.log(item)
  87. this.form.value = item.value
  88. this.form.typeName = item.label
  89. this.showType = false
  90. },
  91. async getpersonfaceFn() {
  92. const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: 'http://192.168.1.44:8001/h5/#/pages/indexEntry/enroll/realName/realName'})
  93. let obj = JSON.parse(res)
  94. this.link = obj.Url
  95. this.$store.commit('updateBizToken', obj.BizToken)
  96. // #ifdef H5
  97. window.open(this.link, '_blank')
  98. // #endif
  99. // var regex = /\[.*?\]/;
  100. // alert(obj.BizToken)
  101. // this.GetDetectInfoEnhancedFn(obj.BizToken)
  102. console.log(obj)
  103. },
  104. async GetDetectInfoEnhancedFn(bizToken) {
  105. let obj = {
  106. ruleId: 1,
  107. redirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
  108. bizToken: 'C9C2BC8E-8336-4071-84B3-8170E283E6CA',
  109. userId: this.userId
  110. }
  111. const {data: res} = await GetDetectInfoEnhanced(obj)
  112. let obj2 = JSON.parse(res)
  113. console.log(obj2)
  114. console.log('请求结果来了')
  115. console.log(obj2.Text.ErrMsg=='成功')
  116. // uni.setStorageSync(obj2)
  117. },
  118. goNext() {
  119. if(!this.form.value) return this.$u.toast('请选择证件类型')
  120. // 去签约
  121. if(this.vuex_userInfo.applyStep==3) {
  122. return this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  123. }
  124. // 去填表
  125. if(this.vuex_userInfo.applyStep==2) {
  126. return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
  127. }
  128. // 去支付
  129. if(this.vuex_userInfo.applyStep==4||this.vuex_userInfo.applyStep==5) {
  130. return this.$goPage('/pages/indexEntry/enroll/payment/payment')
  131. }
  132. if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) {
  133. // return this.$goPage('/pages/indexEntry/enroll/realName/realName')
  134. this.getpersonfaceFn()
  135. }
  136. // this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  137. // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
  138. }
  139. }
  140. }
  141. </script>
  142. <style>
  143. .input1::placeholder {
  144. color: red !important;
  145. }
  146. </style>
  147. <style lang="scss" scoped>
  148. .card {
  149. padding: 10rpx 46rpx 10rpx 32rpx;
  150. margin-bottom: 20rpx;
  151. .row {
  152. height: 100rpx;
  153. display: flex;
  154. align-items: center;
  155. .lab {
  156. width: 152rpx;
  157. }
  158. .rightCon {
  159. flex: 1;
  160. width: 0;
  161. display: flex;
  162. .val {
  163. flex: 1;
  164. width: 0;
  165. input {
  166. font-size: 28rpx;
  167. }
  168. }
  169. .icon {
  170. width: 30rpx;
  171. height: 30rpx;
  172. u-icon {
  173. }
  174. }
  175. }
  176. }
  177. }
  178. .btnBg {
  179. width: 396rpx;
  180. margin: 100rpx auto 0 auto;
  181. }
  182. </style>