优化客服聊天

This commit is contained in:
龙运模
2024-11-14 22:20:02 +08:00
parent 8e660fd657
commit 8ea101637e
17 changed files with 532 additions and 83 deletions
+8 -1
View File
@@ -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() {