From f163737585dbc9d8c2313cb29cf8d4503cf39f50 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期二, 31 十二月 2024 11:40:01 +0800
Subject: [PATCH] feat:山西打印治超单

---
 store/index.js |  145 +++++++++++++++++++++++++++++-------------------
 1 files changed, 87 insertions(+), 58 deletions(-)

diff --git a/store/index.js b/store/index.js
index bdb23b7..7b7f211 100644
--- a/store/index.js
+++ b/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: [], // 鐢ㄦ埛鎵�鍦ㄨ鑹插簳閮ㄨ彍鍗曪紝
 		// 绉伴噸鏃剁殑閲嶉噺
@@ -93,66 +108,65 @@
 		globalIntervalId: null,
 		is_open_socket: false, //閬垮厤閲嶅杩炴帴
 		connectNum: 1, //閲嶈繛娆℃暟,
-		reconnectTimeOut: null,
-		// 鎵撳嵃鍑哄叆闂ㄨ瘉  涓�娆″氨鍙互鏈夋墦鍗板叆闂ㄨ瘉锛�  涓ゆ鍙互鏈夊叆闂ㄨ瘉 鍑洪棬璇�  0娆′竴寮犻兘娌℃湁 
+		reconnectTimeOut: null,  //閲嶆柊閾炬帴鐨勫畾鏃跺櫒
+		// 鎵撳嵃鍑哄叆闂ㄨ瘉  涓�娆″氨鍙互鏈夋墦鍗板叆闂ㄨ瘉锛�  涓ゆ鍙互鏈夊叆闂ㄨ瘉 鍑洪棬璇�  0娆′竴寮犻兘娌℃湁
 		ablePrintInduction: false, //鍏ラ棬璇�
 		ablePrintOut: false, //鍑洪棬璇�
-		driverTourImgList: ['https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj1.png',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj2.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj3.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj4.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj5.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj6.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj7.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj8.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj9.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj10.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj11.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj12.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj13.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj14.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj15.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj16.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj17.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj18.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj19.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj20.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj21.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj22.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj23.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj24.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj25.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj26.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj27.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj28.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj29.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj30.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj31.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj32.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj33.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj33-1.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj34.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj35.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj36.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj37.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj38.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj39.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj40.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj41.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj42.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj43.jpg',
-			'https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj44.jpg',
+		driverTourImgList: ['https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj1.png',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj2.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj3.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj4.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj5.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj6.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj7.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj8.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj9.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj10.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj11.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj12.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj13.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj14.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj15.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj16.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj17.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj18.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj19.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj20.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj21.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj22.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj23.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj24.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj25.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj26.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj27.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj28.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj29.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj30.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj31.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj32.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj33.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj33-1.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj34.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj35.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj36.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj37.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj38.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj39.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj40.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj41.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj42.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj43.jpg',
+			'https://mr1.res.jzeg.cn:9096/appimg/image/tour/driver/sj44.jpg',
 		],
 		wsgVisiable: false, //纾呮埧蹇欑寮圭獥鎺у埗
 		wsgContent: '',
 		globalIsFirstWeighing: 1, //鏄惁鏄涓�娆′笂纾�
 		confirmWeighVisiable: false, //纾呮埧绠$悊纭绉伴噸瀹屾垚鎻愮ず寮圭獥
-		confirmWeighContent: ''
+		confirmWeighContent: '',
+		// 绉伴噸绋冲畾鎬�  0/绋冲畾 1/闈炵ǔ瀹�  闈炵ǔ瀹氭�佷笉鑳界偣绉伴噸
+		globalWarning: false,
 	},
 	mutations: {
-		lengthchange(state, payload) {
-			state.fleetDriverDataLength = payload
-		},
 		setUserInfo(state, identity) {
 			state.userInfo = userObj[identity]
 		},
@@ -167,6 +181,9 @@
 				uni.setStorageSync('userTabbar', state.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)
 			}
 		},
@@ -194,7 +211,7 @@
 		changesocketTask(state, payload) {
 			state.socketTask = payload
 		},
-		// 鏀圭増鍏ㄥ眬websocket鐘舵��
+		// 鏀圭増鍏ㄥ眬websocket鐘舵�侊紙鍒ゆ柇鏄惁姝e父閾炬帴锛�
 		changeisconnect(state, payload) {
 			state.globalisconnect = payload
 		},
@@ -244,11 +261,20 @@
 		},
 		changeconfirmWeighContent(state, payload) {
 			state.confirmWeighContent = payload
-		}
+		},
+		// 鏀瑰彉绋冲畾鎬�
+		changeWarning(state, payload) {
+			state.globalWarning = payload
+		},
 	},
 	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' },
@@ -274,8 +300,8 @@
 		},
 		websocketOnOpen({ state, commit }) {
 			console.log('ws鎵撳紑')
-			clearInterval(state.reconnectTimeOut)
-			clearInterval(state.globalIntervalId)
+			clearInterval(state.reconnectTimeOut) //娓呴櫎涓婁竴娆$殑瀹氭椂鍣�
+			clearInterval(state.globalIntervalId)  //娓呴櫎蹇冭烦
 			state.globalIntervalId = setInterval(() => {
 				state.socketTask.send({
 					data: JSON.stringify({ type: 'ping' }),
@@ -295,8 +321,7 @@
 			clearInterval(state.reconnectTimeOut)
 			state.socketTask = null
 			commit('changereconnectState', false)
-			console.log(state.connectNum, state.connectNum.connectNum, '閾炬帴鏁�');
-			if (state.connectNum < 6 || state.connectNum.connectNum < 6 && state.globalisLogin) {
+			if ((state.connectNum < 6 || state.connectNum.connectNum < 6) && state.globalisLogin) {
 				uni.showToast({
 					title: '杩炴帴澶辫触锛屾鍦ㄥ皾璇曢噸鏂拌繛鎺�',
 					icon: 'none'
@@ -351,7 +376,11 @@
 				}, 5000)
 			}
 		}
+	},
+	getters: {
+		websocketData:(state) => state.websocketData
 	}
+
 })
 
-export default store
\ No newline at end of file
+export default store

--
Gitblit v1.9.1