|
@@ -38,7 +38,9 @@ const store = new Vuex.Store({
|
|
|
vuex_hasLogin: lifeData.vuex_hasLogin ? lifeData.vuex_hasLogin : false,
|
|
|
vuex_openid: lifeData.vuex_openid ? lifeData.vuex_openid : '',
|
|
|
// 如果无需保存到本地永久存储,无需lifeData.xx方式
|
|
|
-
|
|
|
+ vuex_socket: null,
|
|
|
+ vuex_wsMessageData: '',
|
|
|
+ vuex_heartInterId: null,
|
|
|
},
|
|
|
mutations: {
|
|
|
$uStore(state, payload) {
|
|
@@ -95,12 +97,6 @@ const store = new Vuex.Store({
|
|
|
let ret = JSON.parse(e.data)
|
|
|
console.log('ws接收!', ret)
|
|
|
state.vuex_wsMessageData = ret
|
|
|
- // 入厂车辆拍照识别
|
|
|
- if (ret.type == 'enter_store_vehicle'){}
|
|
|
- // 新未读消息
|
|
|
- if (ret.type == 'no_read_count'){
|
|
|
- state.vuex_messagUnReadCount = ret.data.no_read_count
|
|
|
- }
|
|
|
}
|
|
|
})
|
|
|
// 发送心跳包
|
|
@@ -111,8 +107,6 @@ const store = new Vuex.Store({
|
|
|
url: wsUrl, // ws 请求地址
|
|
|
complete: ()=> {
|
|
|
console.log('连接complete回调!')
|
|
|
- // 刷新未读消息数量
|
|
|
- uni.$emit("updateUnreadcount",{msg:''})
|
|
|
}
|
|
|
});
|
|
|
}else{
|