|
@@ -75,8 +75,6 @@ const store = new Vuex.Store({
|
|
|
url: wsUrl, // ws 请求地址
|
|
|
complete: ()=> {
|
|
|
console.log('连接complete回调!')
|
|
|
- // 刷新未读消息数量
|
|
|
- uni.$emit("updateUnreadcount",{msg:''})
|
|
|
}
|
|
|
});
|
|
|
// 打开连接
|
|
@@ -135,20 +133,6 @@ const store = new Vuex.Store({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- },
|
|
|
- actions: {
|
|
|
- // 检测是否登录
|
|
|
- checkLogin(context,data){
|
|
|
- checkLogin().then(res => {
|
|
|
- if(res.status == '200'){
|
|
|
- context.commit('$uStore',{name:'vuex_hasLogin',value:true})
|
|
|
- context.commit('$uStore',{name:'vuex_token',value: res.data.token})
|
|
|
- }else{
|
|
|
- context.commit('$uStore',{name:'vuex_hasLogin',value:false})
|
|
|
- context.commit('$uStore',{name:'vuex_token',value: ''})
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
})
|
|
|
|