TapList.vue 3.0 KB

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