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

165 lines
4.0 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. <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">
  10. <input v-model="form.typeName" placeholder="请选择" class="input1" @click="showType=true" 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.type==2">
  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.type==2||form.type==3">
  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">待认证</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="btnBg" @click="goNext">下一步</view>
  46. </view>
  47. <u-picker :show="showType" :columns="typeArr" keyName="lab" @confirm="confirmType" @cancel="showType=false"></u-picker>
  48. <!-- <web-view :src="link"></web-view> -->
  49. <!-- <iframe :src="link" frameborder="0"></iframe> -->
  50. </view>
  51. </template>
  52. <script>
  53. import { getpersonface, GetDetectInfoEnhanced } from '@/config/api.js'
  54. export default {
  55. data() {
  56. return {
  57. form: {
  58. type: 1,
  59. typeName: ''
  60. },
  61. showType: false,
  62. typeArr: [
  63. [
  64. {lab: '居民身份证',id: 1},
  65. {lab: '外国人永久居留身份证',id: 2},
  66. {lab: '军官证',id: 3},
  67. ]
  68. ],
  69. link: 'https://www.baidu.com/?tn=62095104_29_oem_dg&ch=6'
  70. }
  71. },
  72. onLoad() {
  73. this.getpersonfaceFn()
  74. this.GetDetectInfoEnhancedFn()
  75. },
  76. methods: {
  77. confirmType(val) {
  78. let item = val.value[0]
  79. this.form.type = item.id
  80. this.form.typeName = item.lab
  81. this.showType = false
  82. },
  83. async getpersonfaceFn() {
  84. const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/realName/realName'})
  85. let obj = JSON.parse(res)
  86. this.link = obj.Url
  87. this.$store.commit('updateBizToken', obj.BizToken)
  88. alert(this.$store.state.school.BizToken)
  89. // #ifdef H5
  90. window.open(this.link, '_blank')
  91. // #endif
  92. // var regex = /\[.*?\]/;
  93. // alert(obj.BizToken)
  94. // this.GetDetectInfoEnhancedFn(obj.BizToken)
  95. console.log(obj)
  96. },
  97. async GetDetectInfoEnhancedFn(bizToken) {
  98. let obj = {
  99. ruleId: 1,
  100. redirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
  101. bizToken: 'A39C2EF8-9FF7-415D-BA4B-51F9457395CE'
  102. }
  103. const {data: res} = await GetDetectInfoEnhanced(obj)
  104. let obj2 = JSON.parse(res)
  105. console.log(obj2)
  106. console.log('请求结果来了')
  107. console.log(obj2.Text)
  108. // uni.setStorageSync(obj2)
  109. },
  110. goNext() {
  111. // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
  112. }
  113. }
  114. }
  115. </script>
  116. <style>
  117. .input1::placeholder {
  118. color: red !important;
  119. }
  120. </style>
  121. <style lang="scss" scoped>
  122. .card {
  123. padding: 10rpx 46rpx 10rpx 32rpx;
  124. margin-bottom: 20rpx;
  125. .row {
  126. height: 100rpx;
  127. display: flex;
  128. align-items: center;
  129. .lab {
  130. width: 152rpx;
  131. }
  132. .rightCon {
  133. flex: 1;
  134. width: 0;
  135. display: flex;
  136. .val {
  137. flex: 1;
  138. width: 0;
  139. input {
  140. font-size: 28rpx;
  141. }
  142. }
  143. .icon {
  144. width: 30rpx;
  145. height: 30rpx;
  146. u-icon {
  147. }
  148. }
  149. }
  150. }
  151. }
  152. .btnBg {
  153. width: 396rpx;
  154. margin: 100rpx auto 0 auto;
  155. }
  156. </style>