index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view class="client-setting">
  3. <page-navbar bgColor="#fff" title="设置"></page-navbar>
  4. <base-card marginBottom="24rpx" padding="0 24rpx">
  5. <u-cell-group v-for="(item, index) in LinkList1" :key="index" :border="false">
  6. <u-cell :title="item.title" isLink :border="index !== 1" :url="item.url" />
  7. </u-cell-group>
  8. </base-card>
  9. <base-card marginBottom="24rpx" padding="0 24rpx">
  10. <u-cell-group v-for="(item, index) in LinkList2" :key="index" :border="false">
  11. <u-cell :title="item.title" isLink :border="index !== 2" :url="item.url" />
  12. </u-cell-group>
  13. </base-card>
  14. <base-card padding="0 24rpx">
  15. <u-cell-group v-for="(item, index) in LinkList3" :key="index" :border="false">
  16. <u-cell :title="item.title" isLink :border="index !== 1" :url="item.url" />
  17. </u-cell-group>
  18. </base-card>
  19. <view>
  20. <u-button text="切换角色" :customStyle="customStyleRole" @click="handleRole"></u-button>
  21. <u-button text="退出登录" :customStyle="customStyleOut" @click="handleLogout"></u-button>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. LinkList1: [
  30. {
  31. title: '个人信息',
  32. url: '/PageMine/personInfo/index',
  33. },
  34. {
  35. title: '我的地址',
  36. url: '/PageMine/address/index',
  37. },
  38. ],
  39. LinkList2: [
  40. {
  41. title: '用户协议',
  42. url: '/pages/webview/index?target=http://8.137.122.65:88/用户协议.html',
  43. },
  44. {
  45. title: '隐私协议',
  46. url: '/pages/webview/index?target=http://8.137.122.65:88/隐私政策.html',
  47. },
  48. {
  49. title: '注销账号',
  50. url: '',
  51. },
  52. ],
  53. LinkList3: [
  54. {
  55. title: '意见反馈',
  56. url: '/PageMine/feedback/index',
  57. },
  58. {
  59. title: '关于车旅程',
  60. url: '/PageMine/setting/aboutUs',
  61. },
  62. ],
  63. };
  64. },
  65. computed: {
  66. customStyleOut() {
  67. return {
  68. color: '#EB3636',
  69. marginTop: '32rpx',
  70. borderRadius: '16rpx',
  71. height: '94rpx',
  72. border: 'none',
  73. fontSize: '30rpx',
  74. };
  75. },
  76. customStyleRole() {
  77. return {
  78. color: '#0C1223',
  79. marginTop: '32rpx',
  80. borderRadius: '16rpx',
  81. height: '94rpx',
  82. border: 'none',
  83. fontSize: '30rpx',
  84. };
  85. },
  86. },
  87. methods: {
  88. handleRole() {
  89. this.$u.toast('该功能暂未开发,尽情期待!');
  90. // this.$store.dispatch('SwitchIdentity', 'MERCHANT');
  91. // uni.navigateTo({
  92. // url: '/pages/merchant/mine/index',
  93. // });
  94. },
  95. handleLogout() {
  96. this.$store.dispatch('Logout').then(() => {
  97. uni.navigateTo({
  98. url: `pages/login/login`,
  99. });
  100. });
  101. },
  102. },
  103. };
  104. </script>
  105. <style lang="scss" scoped>
  106. .client-setting {
  107. padding: 20rpx 32rpx;
  108. ::v-deep .u-cell__body {
  109. padding: 20rpx 0;
  110. color: #0c1223;
  111. font-size: 28rpx;
  112. }
  113. ::v-deep .u-cell__title-text {
  114. line-height: 60rpx !important;
  115. }
  116. }
  117. </style>