doum
2026-04-29 59b1f0e9967902aa10f5e017d5a0bdfd1b60c9ea
small-program/components/custom-tabbar/custom-tabbar.vue
@@ -12,7 +12,6 @@
<script>
   import { mapState } from 'vuex'
   export default {
      name: 'CustomTabbar',
      data() {
@@ -59,7 +58,7 @@
               },
               {
                  text: '消息',
                  pagePath: '/pages/message/message',
                  pagePath: '/shop/pages/message/message',
                  iconPath: '/static/icon/nav_xiaoxi@2x.png',
                  selectedIconPath: '/static/icon/nav_xiaoxi_sel@2x.png'
               },
@@ -99,10 +98,21 @@
         },
         switchTab(item) {
            const currentPath = getCurrentPages()[getCurrentPages().length - 1].$page.fullPath
            if (currentPath !== item.pagePath) {
               uni.switchTab({
                  url: item.pagePath
               })
            if (this.userType === 1) {
               if (currentPath !== item.pagePath) {
                  uni.redirectTo({
                     url: item.pagePath
                  })
               }
            } else {
               if (currentPath !== item.pagePath) {
                  if(item.pagePath ==='/pages/itinerary/itinerary'){
                     uni.setStorageSync("orderStatus",-1)
                  }
                  uni.switchTab({
                     url: item.pagePath
                  })
               }
            }
         }
      }