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

127 lines
3.1 KiB

10 months 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="val">{{ vuex_userInfo.phone }}</view>
  9. </view>
  10. </view>
  11. <view class="card" v-if="vuex_userInfo.schoolName">
  12. <view class="row border">
  13. <view class="lab">我的驾校</view>
  14. <view class="val">{{ vuex_userInfo.schoolName||'' }}</view>
  15. </view>
  16. <view class="row border">
  17. <view class="lab">我的教练</view>
  18. <view class="val">{{ vuex_userInfo.coachName||'' }}</view>
  19. </view>
  20. <view class="row border">
  21. <view class="lab">所学车型</view>
  22. <view class="val">{{ vuex_userInfo.trainType||'' }}</view>
  23. </view>
  24. <view class="row">
  25. <view class="lab">报名时间</view>
  26. <view class="val">{{ $u.timeFormat(vuex_userInfo.applyDate, 'yyyy-mm-dd hh:MM:ss')}}</view>
  27. </view>
  28. </view>
  29. <view class="card" v-if="vuex_userInfo.cardType>1" @click="$goPage('/pages/mineEntry/personaInfo/myInfo')">
  30. <view class="row">
  31. <view class="lab">个人信息</view>
  32. <view class="flex">
  33. <view class="val">查看</view>
  34. <view class="icon">
  35. <u-icon name="arrow-right"></u-icon>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="card" v-if="vuex_userInfo.cardType==1">
  41. <view class="row">
  42. <view class="lab">实名认证</view>
  43. <view class="val">已完成</view>
  44. </view>
  45. </view>
  46. <view class="card" v-if="cardType==1">
  47. <view class="row">
  48. <view class="lab">拍照&体检&面签</view>
  49. <view class="val">已完成</view>
  50. </view>
  51. </view>
  52. <view class="logout" @click="logOutFn">退出登录</view>
  53. <view class="logout" @click="deleteTestClick" style="margin-top: 40rpx;">删除测试账号开发用的</view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. import { logOut,deleteTest } from '@/config/api.js'
  59. export default {
  60. methods: {
  61. logOutFn() {
  62. let _this = this
  63. uni.showModal({
  64. content: '确定要退出登录吗?',
  65. success: async function (res) {
  66. if (res.confirm) {
  67. logOut().then(()=>{
  68. _this.$store.commit('goLogin')
  69. }).catch(()=>{
  70. _this.$store.commit('goLogin')
  71. })
  72. } else if (res.cancel) {
  73. console.log('用户点击取消');
  74. }
  75. }
  76. });
  77. },
  78. async deleteTestClick() {
  79. const res = await deleteTest({phone: this.vuex_userInfo.phone})
  80. this.$store.commit('goLogin')
  81. console.log(res)
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .card {
  88. padding: 6rpx;
  89. margin-bottom: 20rpx;
  90. }
  91. .row {
  92. display: flex;
  93. align-items: center;
  94. justify-content: space-between;
  95. height: 98rpx;
  96. font-size: 28rpx;
  97. padding: 0 30rpx;
  98. &.border {
  99. border-bottom: 2rpx solid #E8E9EC;
  100. }
  101. }
  102. .logout {
  103. width: 396rpx;
  104. height: 72rpx;
  105. background: #FFFFFF;
  106. border-radius: 8rpx;
  107. border: 2rpx solid #E8E9EC;
  108. font-size: 28rpx;
  109. color: #ADADAD;
  110. text-align: center;
  111. line-height: 72rpx;
  112. margin: 88rpx auto;
  113. }
  114. </style>