江西小程序管理端
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.

113 lines
2.7 KiB

1 year ago
8 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
8 months 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"> {{ hideMiddleDigits(vuex_userInfo.user.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">48372*****03928</view>
  33. </view>
  34. </view> -->
  35. <view class="btnBox">
  36. <view class="logout" @click="$goPage('/pages/login/login')">退出登录</view>
  37. <view class="logout" @click="$goPage('/pages/userCenter/forgetPwd/forgetPwd')">修改密码</view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. methods: {
  45. hideMiddleDigits(phoneNumber) {
  46. // 判断是否为有效的电话号码
  47. if (phoneNumber.length === 11) {
  48. // 获取号码的前三位和后四位
  49. const firstThreeDigits = phoneNumber.slice(0, 3);
  50. const lastFourDigits = phoneNumber.slice(-4);
  51. // 生成隐藏中间数字的字符串
  52. const hiddenDigits = '*'.repeat(3);
  53. // 拼接成最终的隐藏中间数字的电话号码
  54. const hiddenPhoneNumber = firstThreeDigits + hiddenDigits + lastFourDigits;
  55. return hiddenPhoneNumber;
  56. } else {
  57. // 如果不是有效的10位电话号码,可能需要进行错误处理
  58. console.error('Invalid phone number format');
  59. return phoneNumber;
  60. }
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .card {
  67. padding: 6rpx;
  68. margin-bottom: 20rpx;
  69. }
  70. .row {
  71. display: flex;
  72. align-items: center;
  73. justify-content: space-between;
  74. height: 98rpx;
  75. font-size: 28rpx;
  76. padding: 0 30rpx;
  77. &.border {
  78. border-bottom: 2rpx solid #E8E9EC;
  79. }
  80. }
  81. .btnBox {
  82. display: flex;
  83. justify-content: center;
  84. flex-direction: column;
  85. width: 100%;
  86. align-items: center;
  87. margin: 188rpx 0;
  88. }
  89. .logout {
  90. width: 396rpx;
  91. height: 72rpx;
  92. background: #FFFFFF;
  93. border-radius: 8rpx;
  94. border: 2rpx solid #E8E9EC;
  95. font-size: 28rpx;
  96. color: #ADADAD;
  97. text-align: center;
  98. line-height: 72rpx;
  99. margin-bottom: 30rpx;
  100. }
  101. </style>