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

197 lines
4.9 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
5 months ago
10 months ago
5 months ago
10 months ago
10 months ago
5 months ago
10 months ago
10 months ago
10 months ago
5 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 class="AccountCancellation" @click="AccountCanceFn">注销账号</view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import { logOut,deleteTest } from '@/config/api.js'
  69. export default {
  70. data() {
  71. return {
  72. avatarLink: ''
  73. }
  74. },
  75. onLoad() {
  76. uni.$on('uAvatarCropper', (res)=>{
  77. this.avatarLink = res
  78. })
  79. },
  80. methods: {
  81. AccountCanceFn() {
  82. this.$goPage('/pages/mineEntry/personaInfo/AccountCance')
  83. },
  84. logOutFn() {
  85. let _this = this
  86. uni.showModal({
  87. content: '确定要退出登录吗?',
  88. success: async function (res) {
  89. if (res.confirm) {
  90. logOut().then(()=>{
  91. _this.$store.commit('goLogin')
  92. }).catch(()=>{
  93. _this.$store.commit('goLogin')
  94. })
  95. } else if (res.cancel) {
  96. console.log('用户点击取消');
  97. }
  98. }
  99. });
  100. },
  101. async deleteTestClick() {
  102. const res = await deleteTest({phone: this.vuex_userInfo.phone})
  103. this.$store.commit('goLogin')
  104. console.log(res)
  105. },
  106. uploadTap() {
  107. // let studentId = uni.getStorageSync('studentId')
  108. // if(!studentId&&!this.havePay) return false
  109. const _this = this;
  110. uni.chooseImage({
  111. count: 1, // 默认9
  112. sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
  113. sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
  114. success: (res) => {
  115. let url = res.tempFilePaths[0];
  116. // 获取裁剪图片资源后,给data添加src属性及其值
  117. uni.navigateTo({
  118. url: '/pages/indexEntry/enroll/uploadAvatar/uAvatarCropper/uAvatarCropper?url=' + encodeURIComponent(url)
  119. })
  120. }
  121. });
  122. },
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .card {
  128. padding: 6rpx;
  129. margin-bottom: 20rpx;
  130. }
  131. .pad {
  132. overflow: hidden;
  133. }
  134. .avatarBox {
  135. width: 175rpx;
  136. height: 175rpx;
  137. margin: 50rpx auto 50rpx auto;
  138. position: relative;
  139. .avatar {
  140. width: 100%;
  141. height: 100%;
  142. border-radius: 50%;
  143. overflow: hidden;
  144. background-color: #E8E9EC;
  145. }
  146. .phoneIcon {
  147. width: 46rpx;
  148. height: 46rpx;
  149. position: absolute;
  150. right: 0;
  151. bottom: 0;
  152. z-index: 9;
  153. }
  154. }
  155. .row {
  156. display: flex;
  157. align-items: center;
  158. justify-content: space-between;
  159. height: 98rpx;
  160. font-size: 28rpx;
  161. padding: 0 30rpx;
  162. &.border {
  163. border-bottom: 2rpx solid #E8E9EC;
  164. }
  165. }
  166. .logout {
  167. width: 396rpx;
  168. height: 72rpx;
  169. background: #FFFFFF;
  170. border-radius: 8rpx;
  171. border: 2rpx solid #E8E9EC;
  172. font-size: 28rpx;
  173. color: #ADADAD;
  174. text-align: center;
  175. line-height: 72rpx;
  176. margin: 88rpx auto;
  177. }
  178. .AccountCancellation {
  179. border: 1px solid #d1d1d1;;
  180. border-radius: 8rpx;
  181. border-color: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%);
  182. line-height: 72rpx;
  183. color: #999;
  184. text-align: center;
  185. font-size: 28rpx;
  186. margin-top: 30rpx;
  187. }
  188. </style>