优化客服聊天
This commit is contained in:
@@ -66,11 +66,18 @@ export default {
|
||||
mounted() {
|
||||
let token = this.$TOOL.cookie.get('TOKEN');
|
||||
if (token && token != null) {
|
||||
// 登录成功连接ws
|
||||
let global_callback = function () {};
|
||||
this.$socketApi.createWebSocket(global_callback);
|
||||
|
||||
// 获取新消息
|
||||
eventBus.$on('sockBack', this.getWsResult);
|
||||
|
||||
|
||||
const userInfo = this.$TOOL.data.get("USER_INFO");
|
||||
this.user_id = userInfo.id;
|
||||
if(userInfo && userInfo.id){
|
||||
this.user_id = userInfo.id;
|
||||
}
|
||||
}
|
||||
},
|
||||
unmounted() {
|
||||
|
||||
Reference in New Issue
Block a user