洛阳学员端
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.

183 lines
4.5 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
5 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="pageBg">
  3. <view class="pad">
  4. <!-- <view class="avatarBox" @click="uploadTap">
  5. <view class="avatar">
  6. <image :src="avatarLink" mode=""></image>
  7. </view>
  8. <view class="phoneIcon">
  9. <image src="@/static/images/mineIcon/camera.png" mode=""></image>
  10. </view>
  11. </view> -->
  12. <view class="card">
  13. <view class="row">
  14. <view class="lab">手机号</view>
  15. <view class="val">{{ vuex_userInfo.phone }}</view>
  16. </view>
  17. </view>
  18. <view class="card" v-if="vuex_userInfo.schoolName">
  19. <view class="row border">
  20. <view class="lab">我的驾校</view>
  21. <view class="val">{{ vuex_userInfo.schoolName||'' }}</view>
  22. </view>
  23. <view class="row border">
  24. <view class="lab">我的教练</view>
  25. <view class="val">{{ vuex_userInfo.coachName||'' }}</view>
  26. </view>
  27. <view class="row border">
  28. <view class="lab">所学车型</view>
  29. <view class="val">{{ vuex_userInfo.trainType||'' }}</view>
  30. </view>
  31. <view class="row">
  32. <view class="lab">报名时间</view>
  33. <view class="val">{{ $u.timeFormat(vuex_userInfo.applyDate, 'yyyy-mm-dd hh:MM:ss')}}</view>
  34. </view>
  35. </view>
  36. <view class="card" v-if="vuex_userInfo.cardType>1" @click="$goPage('/pages/mineEntry/personaInfo/myInfo')">
  37. <view class="row">
  38. <view class="lab">个人信息</view>
  39. <view class="flex">
  40. <view class="val">查看</view>
  41. <view class="icon">
  42. <u-icon name="arrow-right"></u-icon>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="card" v-if="vuex_userInfo.cardType==1">
  48. <view class="row">
  49. <view class="lab">实名认证</view>
  50. <view class="val">已完成</view>
  51. </view>
  52. </view>
  53. <!-- <view class="card" v-if="vuex_userInfo.cardType==1">
  54. <view class="row">
  55. <view class="lab">拍照&体检&面签</view>
  56. <view class="val">已完成</view>
  57. </view>
  58. </view> -->
  59. <!-- <view class="logout" @click="deleteTestClick" style="margin-top: 40rpx;">删除测试账号开发用的</view> -->
  60. </view>
  61. <view class="footerBtn">
  62. <view class="btnBg" @click="logOutFn">退出登录</view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import { logOut,deleteTest } from '@/config/api.js'
  68. export default {
  69. data() {
  70. return {
  71. avatarLink: ''
  72. }
  73. },
  74. onLoad() {
  75. uni.$on('uAvatarCropper', (res)=>{
  76. this.avatarLink = res
  77. })
  78. },
  79. methods: {
  80. logOutFn() {
  81. let _this = this
  82. uni.showModal({
  83. content: '确定要退出登录吗?',
  84. success: async function (res) {
  85. if (res.confirm) {
  86. logOut().then(()=>{
  87. _this.$store.commit('goLogin')
  88. }).catch(()=>{
  89. _this.$store.commit('goLogin')
  90. })
  91. } else if (res.cancel) {
  92. console.log('用户点击取消');
  93. }
  94. }
  95. });
  96. },
  97. async deleteTestClick() {
  98. const res = await deleteTest({phone: this.vuex_userInfo.phone})
  99. this.$store.commit('goLogin')
  100. console.log(res)
  101. },
  102. uploadTap() {
  103. // let studentId = uni.getStorageSync('studentId')
  104. // if(!studentId&&!this.havePay) return false
  105. const _this = this;
  106. uni.chooseImage({
  107. count: 1, // 默认9
  108. sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
  109. sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
  110. success: (res) => {
  111. let url = res.tempFilePaths[0];
  112. // 获取裁剪图片资源后,给data添加src属性及其值
  113. uni.navigateTo({
  114. url: '/pages/indexEntry/enroll/uploadAvatar/uAvatarCropper/uAvatarCropper?url=' + encodeURIComponent(url)
  115. })
  116. }
  117. });
  118. },
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .card {
  124. padding: 6rpx;
  125. margin-bottom: 20rpx;
  126. }
  127. .pad {
  128. overflow: hidden;
  129. }
  130. .avatarBox {
  131. width: 175rpx;
  132. height: 175rpx;
  133. margin: 50rpx auto 50rpx auto;
  134. position: relative;
  135. .avatar {
  136. width: 100%;
  137. height: 100%;
  138. border-radius: 50%;
  139. overflow: hidden;
  140. background-color: #E8E9EC;
  141. }
  142. .phoneIcon {
  143. width: 46rpx;
  144. height: 46rpx;
  145. position: absolute;
  146. right: 0;
  147. bottom: 0;
  148. z-index: 9;
  149. }
  150. }
  151. .row {
  152. display: flex;
  153. align-items: center;
  154. justify-content: space-between;
  155. height: 98rpx;
  156. font-size: 28rpx;
  157. padding: 0 30rpx;
  158. &.border {
  159. border-bottom: 2rpx solid #E8E9EC;
  160. }
  161. }
  162. .logout {
  163. width: 396rpx;
  164. height: 72rpx;
  165. background: #FFFFFF;
  166. border-radius: 8rpx;
  167. border: 2rpx solid #E8E9EC;
  168. font-size: 28rpx;
  169. color: #ADADAD;
  170. text-align: center;
  171. line-height: 72rpx;
  172. margin: 88rpx auto;
  173. }
  174. </style>