| | |
| | | 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: [], // 用户所在角色底部菜单, |
| | | // 称重时的重量 |
| | |
| | | } 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) |
| | | } |
| | | }, |
| | | // 改变重量 |
| | |
| | | }, |
| | | 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' }, |