yangan
2024-12-31 f163737585dbc9d8c2313cb29cf8d4503cf39f50
store/index.js
@@ -55,12 +55,27 @@
         selectedIconPath: '../../static/tabBar-icon/Bmine57.png',
         text: '我的'
      }
   ],
   six:[{
      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: {},
      ispecial:['1821820980778090498'], //用来判断是不是山西大远矿
      roleType: null, // 1客户,2货代,3司机 5装卸员
      userTabbar: [], // 用户所在角色底部菜单,
      // 称重时的重量
@@ -167,6 +182,9 @@
         } else if (roleType == 5) {
            state.userTabbar = userRoleTabbar.three
            uni.setStorageSync('userTabbar', state.userTabbar)
         }else if(roleType == 6){
            state.userTabbar = userRoleTabbar.six
            uni.setStorageSync('userTabbar', state.userTabbar)
         }
      },
      // 改变重量
@@ -251,7 +269,12 @@
   },
   actions: {
      websocketInit({ state, dispatch, commit }) {
         // #ifdef H5
         let wsUrl = `${webSocketUrl}?UUID=${uni.getStorageSync('token')}`
         // #endif
         // #ifndef H5
         let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`
         // #endif
         state.socketTask = uni.connectSocket({
            url: wsUrl,
            header: { CLIENT_TOC: 'Y' },