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

162 lines
4.0 KiB

  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="value">{{form.name}}</view>
  9. </view>
  10. <view class="row">
  11. <view class="lab">证件号</view>
  12. <view class="value">{{form.idcard}}</view>
  13. </view>
  14. <view class="row">
  15. <view class="lab">证件类型</view>
  16. <view class="value">身份证</view>
  17. </view>
  18. </view>
  19. <view class="card">
  20. <view class="row">
  21. <view class="lab">手机号</view>
  22. <view class="rightCon">
  23. <view class="val">
  24. <input v-model="form.phone" placeholder="请输入手机号" /></input>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="row">
  29. <view class="lab">驾校名称</view>
  30. <view class="rightCon">
  31. <view class="val">
  32. <input v-model="form.schoolName" placeholder="请输入驾校名称" /></input>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="row">
  37. <view class="lab">学驾车型</view>
  38. <view class="rightCon">
  39. <view class="val" @click="showType=true">
  40. <input v-model="form.trainType" placeholder="请选择" disabled="" style="pointer-events: none;"/></input>
  41. </view>
  42. <view class="icon" @click="showType=true">
  43. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;"></u-icon>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="btnBg" @click="goNext">确认</view>
  49. </view>
  50. <u-picker :show="showType" :columns="typeArr" @confirm="confirmType"
  51. @cancel="showType=false"></u-picker>
  52. </view>
  53. </template>
  54. <script>
  55. import {
  56. applyOnline
  57. } from '@/config/api.js'
  58. export default {
  59. data() {
  60. return {
  61. form: {
  62. value: 1,
  63. cardType: '身份证',
  64. phone: '',
  65. trainType: '',
  66. name: '',
  67. idcard: '',
  68. schoolName: '',
  69. applyType: 5,//(1:普通学员,2:免费学员,3:定向学员,4:理科免费学员,5:驾校免费学员)
  70. },
  71. showType: false,
  72. typeArr: [
  73. ['C1','C2','C3','A2','B2','A1','A3','B1','D','E','F','C4','C5','C6']
  74. ],
  75. }
  76. // 报名进度(0:待报名,1:已选驾校,2:已实名制,3:已填写报名信息,4:已签署合同,5:待支付,6:已支付)
  77. },
  78. onLoad(options) {
  79. this.form.userId = this.userId
  80. this.form.phone = this.vuex_userInfo.phone
  81. this.form.accountId = this.vuex_userInfo.accountId
  82. this.form.address = this.vuex_userInfo.address
  83. this.form.name = this.vuex_userInfo.name
  84. this.form.idcard = this.vuex_userInfo.idcard
  85. this.form.nationality = this.vuex_userInfo.nationality || '中国'
  86. this.form.cardType = this.vuex_userInfo.cardType || '1'
  87. },
  88. methods: {
  89. confirmType(val) {
  90. let item = val.value[0]
  91. console.log(item)
  92. this.form.trainType = item.value
  93. // this.form.typeName = item.label
  94. this.showType = false
  95. },
  96. async goNext() {
  97. if(!this.form.phone) return this.$u.toast('请输入手机号')
  98. if(!this.form.schoolName) return this.$u.toast('请输入驾校名称')
  99. if(!this.form.trainType) return this.$u.toast('请选择学驾车型')
  100. const {data: res} = await applyOnline(this.form)
  101. await this.$store.dispatch('getUserInfo')
  102. // this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  103. // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
  104. }
  105. }
  106. }
  107. </script>
  108. <style>
  109. .input1::placeholder {
  110. color: red !important;
  111. }
  112. </style>
  113. <style lang="scss" scoped>
  114. .card {
  115. padding: 10rpx 46rpx 10rpx 32rpx;
  116. margin-bottom: 20rpx;
  117. .row {
  118. height: 100rpx;
  119. display: flex;
  120. align-items: center;
  121. .lab {
  122. width: 152rpx;
  123. }
  124. .rightCon {
  125. flex: 1;
  126. width: 0;
  127. display: flex;
  128. .val {
  129. flex: 1;
  130. width: 0;
  131. input {
  132. font-size: 28rpx;
  133. }
  134. }
  135. .icon {
  136. width: 30rpx;
  137. height: 30rpx;
  138. u-icon {}
  139. }
  140. }
  141. }
  142. }
  143. .btnBg {
  144. width: 396rpx;
  145. margin: 100rpx auto 0 auto;
  146. }
  147. </style>