me.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view style="padding: 20rpx;">
  3. <view style="text-align: center;">
  4. <image :src="user.avatar" style="width: 200rpx; height: 200rpx; border-radius: 50%;"></image>
  5. <view style="margin: 10rpx 0;">{{ user.name }}</view>
  6. <view v-if="user.isRider" style="display: flex; align-items: center; justify-content: center;">
  7. <uni-icons color="#006eff" type="vip-filled" size="18" style="margin-right: 8rpx;"></uni-icons>
  8. <text style="color: #006eff; font-weight: bold; font-size: 16px;">认证骑手</text>
  9. </view>
  10. </view>
  11. <view style="margin: 20rpx 0; " class="box">
  12. <view class="title">用户服务</view>
  13. <view style="display: flex;">
  14. <view class="cartegory-item" @click="goPage('/pages/address/address')">
  15. <image src="../../static/imgs/地址.png" style="width: 50%;" mode="widthFix"></image>
  16. <view style="flex: 1;">我的地址</view>
  17. </view>
  18. <view class="cartegory-item" @click="goPage('/pages/records/records')">
  19. <image src="../../static/imgs/收支.png" style="width: 50%;" mode="widthFix"></image>
  20. <view style="flex: 1;">收支明细</view>
  21. </view>
  22. <view class="cartegory-item" @click="goPage('/pages/myComment/myComment')">
  23. <image src="../../static/imgs/评价.png" style="width: 50%;" mode="widthFix"></image>
  24. <view style="flex: 1;">评价中心</view>
  25. </view>
  26. <view class="cartegory-item" @click="goPage('/pages/wallet/wallet')">
  27. <image src="../../static/imgs/钱包.png" style="width: 50%;" mode="widthFix"></image>
  28. <view style="flex: 1;">我的钱包</view>
  29. </view>
  30. </view>
  31. </view>
  32. <view style="margin: 20rpx 0; " class="box">
  33. <view class="title">骑手服务</view>
  34. <view style="display: flex;">
  35. <view class="cartegory-item" @click="goPage('/pages/certification/certification')">
  36. <image src="../../static/imgs/认证.png" style="width: 30%;" mode="widthFix"></image>
  37. <view style="flex: 1;">骑手认证</view>
  38. </view>
  39. <view class="cartegory-item" @click="goPage('/pages/acceptOrders/acceptOrders')">
  40. <image src="../../static/imgs/跑腿.png" style="width: 30%;" mode="widthFix"></image>
  41. <view style="flex: 1;">骑手订单</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view style="margin: 20rpx 0;" class="box">
  46. <view class="info-item" @click="goPage('/pages/person/person')">
  47. <uni-icons type="person" size="18"></uni-icons>
  48. <text style="margin-left: 10rpx;">个人信息</text>
  49. </view>
  50. <view class="info-item" @click="goPage('/pages/introduce/introduce')">
  51. <uni-icons type="medal" size="18"></uni-icons>
  52. <text style="margin-left: 10rpx;">平台介绍</text>
  53. </view>
  54. <view class="info-item" @click="goPage('/pages/agreement/agreement')">
  55. <uni-icons type="paperclip" size="18"></uni-icons>
  56. <text style="margin-left: 10rpx;">用户协议</text>
  57. </view>
  58. <view class="info-item" @click="logout">
  59. <uni-icons type="undo" size="18"></uni-icons>
  60. <text style="margin-left: 10rpx;">退出登录</text>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. data() {
  68. return {
  69. user: uni.getStorageSync('xm-user')
  70. }
  71. },
  72. methods: {
  73. logout() {
  74. uni.removeStorageSync('xm-user')
  75. uni.removeStorageSync('orderStore') // 清除所有缓存数据
  76. uni.reLaunch({
  77. url: '/pages/login/login'
  78. })
  79. },
  80. goPage(url) {
  81. uni.navigateTo({
  82. url: url
  83. })
  84. }
  85. }
  86. }
  87. </script>
  88. <style>
  89. .title {
  90. font-weight: bold;
  91. font-size: 36rpx;
  92. margin-bottom: 30rpx;
  93. }
  94. .cartegory-item {
  95. flex: 1;
  96. display: flex;
  97. justify-content: space-between;
  98. align-items: center;
  99. flex-direction: column;
  100. grid-gap: 10rpx;
  101. }
  102. .info-item {
  103. padding: 15rpx;
  104. border-bottom: 2rpx solid #eee;
  105. }
  106. .info-item .uni-icons {
  107. position: relative;
  108. top: 2rpx;
  109. }
  110. </style>