qingyiay
2023-08-14 76c41f4669a36b0d4cb5b82906419408a6b7de96
store/index.js
@@ -42,13 +42,26 @@
         selectedIconPath: '../../static/tabBar-icon/Bmine57.png',
         text: '我的'
      }
   ],
   three: [{
         pagePath: 'pages/tabbar-page/index-tabbar/index-tabbar',
         iconPath: '../../static/tabBar-icon/home.png',
         selectedIconPath: '../../static/tabBar-icon/homeblue.png',
         text: '首页'
      },
      {
         pagePath: 'pages/tabbar-page/myPage-tabbar/myPage-tabbar',
         iconPath: '../../static/tabBar-icon/Gmine10.png',
         selectedIconPath: '../../static/tabBar-icon/Bmine57.png',
         text: '我的'
      }
   ]
}
const store = new Vuex.Store({
   state: {
      // 用戶界面判斷
      userInfo: {},
      roleType: null, // 1客户,2货代,3司机
      roleType: null, // 1客户,2货代,3司机 5装卸员
      userTabbar: [], // 用户所在角色底部菜单,
      // 称重时的重量
      globalweigh: 0,
@@ -97,6 +110,9 @@
            uni.setStorageSync('userTabbar', state.userTabbar)
         } else if (roleType == 2 || roleType == 3) {
            state.userTabbar = userRoleTabbar.second
            uni.setStorageSync('userTabbar', state.userTabbar)
         } else if (roleType == 5) {
            state.userTabbar = userRoleTabbar.three
            uni.setStorageSync('userTabbar', state.userTabbar)
         }
      },
@@ -203,7 +219,7 @@
            })
            commit('changereconnectNum', 1)
            dispatch('reconnect')
         } else if (state.connectNum > 6 && state.globalisLogin) {
         } else if (state.connectNum >= 6 && state.globalisLogin) {
            commit('changereconnectNum', 1)
            uni.showToast({
               title: '网络异常,请稍后重试',