TapList.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view>
  3. <!-- 预约列表 -->
  4. <view class="appointList">
  5. <template>
  6. <u-cell
  7. v-for="item in isLinkList1"
  8. :key="item.id"
  9. :border="false"
  10. :icon="item.icon"
  11. :title="item.title"
  12. isLink
  13. :url="item.url"
  14. />
  15. </template>
  16. </view>
  17. <view class="other-out-box">
  18. <u-cell
  19. v-for="item in isLinkList2"
  20. :key="item.id"
  21. :border="false"
  22. :icon="item.icon"
  23. :title="item.title"
  24. :isLink="item.isLink"
  25. :url="item.url"
  26. @click="handleCellClick(item)"
  27. />
  28. </view>
  29. <u-modal
  30. :show="showSwitchDialog"
  31. :showCancelButton="true"
  32. :title="title"
  33. :content="content"
  34. @confirm="confirmSwitch"
  35. @cancel="showSwitchDialog = false"
  36. ></u-modal>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. isLinkList1: [
  44. {
  45. id: '0',
  46. icon: 'list-dot',
  47. title: '预约列表',
  48. url: '/pages/client/clientUser/mine/appoint/appoint',
  49. },
  50. {
  51. id: '1',
  52. icon: 'list',
  53. title: '询价列表',
  54. url: '/pages/client/clientUser/inquiryList',
  55. },
  56. ],
  57. isLinkList2: [
  58. {
  59. id: '0',
  60. icon: 'home-fill',
  61. title: '我的店铺',
  62. url: '',
  63. isLink: false,
  64. },
  65. {
  66. id: '1',
  67. icon: 'plus-people-fill',
  68. title: '我的团队',
  69. url: '/pages/client/clientUser/myGroup',
  70. isLink: true,
  71. },
  72. {
  73. id: '2',
  74. icon: 'server-man',
  75. title: '客服中心',
  76. url: '/pages/client/clientUser/serviceCenter',
  77. isLink: true,
  78. },
  79. {
  80. id: '3',
  81. icon: 'share-square',
  82. title: '意见反馈',
  83. url: '/pages/client/clientUser/mine/setting/feedback',
  84. isLink: true,
  85. },
  86. {
  87. id: '4',
  88. icon: 'thumb-up',
  89. title: '关于我们',
  90. url: '/pages/client/clientUser/mine/setting/aboutMine',
  91. isLink: true,
  92. },
  93. ],
  94. showSwitchDialog: false,
  95. title: '提醒',
  96. content: '您确定要从用户端切换到商家端吗?',
  97. };
  98. },
  99. methods: {
  100. handleCellClick(item) {
  101. console.log('item', item);
  102. if (item.id == 0) {
  103. this.showSwitchDialog = true;
  104. } else {
  105. console.log('点击了非链接项');
  106. }
  107. },
  108. confirmSwitch() {
  109. this.showSwitchDialog = false;
  110. uni.setStorageSync('tabbar_type', false);
  111. uni.navigateTo({
  112. url: '/pages/merchant/tabBar/mine/index',
  113. });
  114. },
  115. },
  116. };
  117. </script>
  118. <style lang="scss" scoped>
  119. .appointList {
  120. margin: 20rpx;
  121. padding: 20rpx 10rpx;
  122. border-radius: 10rpx;
  123. background-color: #fff;
  124. }
  125. .other-out-box {
  126. margin: 20rpx;
  127. padding: 20rpx 10rpx;
  128. border-radius: 10rpx;
  129. margin-top: 0;
  130. box-sizing: border-box;
  131. background-color: $uni-bg-color;
  132. }
  133. </style>