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

210 lines
5.7 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 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar :title="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. import { website } from '@/config/site.config.js'
  54. export default {
  55. data() {
  56. return {
  57. form: {
  58. value: 1,
  59. typeName: '身份证'
  60. },
  61. showType: false,
  62. typeArr: [],
  63. title: '学员报名'
  64. }
  65. // 报名进度(0:待报名,1:已选驾校,2:已实名制,3:已填写报名信息,4:已签署合同,5:待支付,6:已支付)
  66. },
  67. onLoad(options) {
  68. if(options.tit) {
  69. this.title = options.tit
  70. }
  71. // this.GetDetectInfoEnhancedFn()
  72. this.getCardTypeFn()
  73. },
  74. methods: {
  75. // 获取证件类型
  76. async getCardTypeFn() {
  77. const {data: res} = await getCardType()
  78. this.typeArr = [res]
  79. await this.$store.dispatch('getUserInfo')
  80. if(this.vuex_userInfo.applyStep>1) {
  81. res.forEach(item=>{
  82. if(item.value==this.vuex_userInfo.cardType ){
  83. this.form.typeName = item.label
  84. }
  85. })
  86. }
  87. console.log(res)
  88. },
  89. confirmType(val) {
  90. let item = val.value[0]
  91. console.log(item)
  92. this.form.value = item.value
  93. this.form.typeName = item.label
  94. this.showType = false
  95. },
  96. async getpersonfaceFn() {
  97. const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName'})
  98. let obj = JSON.parse(res)
  99. this.link = obj.Url
  100. this.$store.commit('updateBizToken', obj.BizToken)
  101. // #ifdef H5
  102. window.open(this.link, '_blank')
  103. // #endif
  104. // var regex = /\[.*?\]/;
  105. // alert(obj.BizToken)
  106. // this.GetDetectInfoEnhancedFn(obj.BizToken)
  107. // #ifdef MP-WEIXIN
  108. this.$store.commit('updateWebVeiwUrl', this.link)
  109. uni.navigateTo({
  110. url: '/pages/indexEntry/webView/webView'
  111. })
  112. // #endif
  113. console.log(obj)
  114. },
  115. async GetDetectInfoEnhancedFn(bizToken) {
  116. let obj = {
  117. ruleId: 1,
  118. redirectUrl: website + '/pages/indexEntry/enroll/registInfo/registInfo',
  119. bizToken: 'C9C2BC8E-8336-4071-84B3-8170E283E6CA',
  120. userId: this.userId
  121. }
  122. const {data: res} = await GetDetectInfoEnhanced(obj)
  123. let obj2 = JSON.parse(res)
  124. console.log(obj2)
  125. console.log('请求结果来了')
  126. console.log(obj2.Text.ErrMsg=='成功')
  127. // uni.setStorageSync(obj2)
  128. },
  129. goNext() {
  130. // return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
  131. if(!this.form.value) return this.$u.toast('请选择证件类型')
  132. // 去签约
  133. if(this.vuex_userInfo.applyStep==3) {
  134. return this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  135. }
  136. // 去填表
  137. if(this.vuex_userInfo.applyStep==2) {
  138. if(this.title=='学员信息') {
  139. // 非平台学员
  140. return this.$goPage('/pages/indexEntry/NonPlatformStudentInfo/NonPlatformStudentInfo')
  141. }
  142. return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
  143. }
  144. // 去支付
  145. if(this.vuex_userInfo.applyStep==4||this.vuex_userInfo.applyStep==5) {
  146. return this.$goPage('/pages/indexEntry/enroll/payment/payment')
  147. }
  148. if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) {
  149. // return this.$goPage('/pages/indexEntry/enroll/realName/realName')
  150. this.getpersonfaceFn()
  151. }
  152. // this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  153. // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
  154. }
  155. }
  156. }
  157. </script>
  158. <style>
  159. .input1::placeholder {
  160. color: red !important;
  161. }
  162. </style>
  163. <style lang="scss" scoped>
  164. .card {
  165. padding: 10rpx 46rpx 10rpx 32rpx;
  166. margin-bottom: 20rpx;
  167. .row {
  168. height: 100rpx;
  169. display: flex;
  170. align-items: center;
  171. .lab {
  172. width: 152rpx;
  173. }
  174. .rightCon {
  175. flex: 1;
  176. width: 0;
  177. display: flex;
  178. .val {
  179. flex: 1;
  180. width: 0;
  181. input {
  182. font-size: 28rpx;
  183. }
  184. }
  185. .icon {
  186. width: 30rpx;
  187. height: 30rpx;
  188. u-icon {
  189. }
  190. }
  191. }
  192. }
  193. }
  194. .btnBg {
  195. width: 396rpx;
  196. margin: 100rpx auto 0 auto;
  197. }
  198. </style>