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

114 lines
2.5 KiB

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