官方客服代码优化

This commit is contained in:
wxl
2025-01-10 22:51:32 +08:00
parent 1b92d4371d
commit 3943c7e56e
6 changed files with 8 additions and 7 deletions

View File

@@ -42,7 +42,7 @@
}
},
mounted(){
webSocketManager.connect('ws://192.168.1.136:9326/?authorId=8')
webSocketManager.connect('ws://192.168.10.98:9326/?authorId=8')
// 设置收到消息回调函数
webSocketManager.onMessage((data) => {
@@ -51,6 +51,7 @@
console.log(JSON.stringify(data.body))
const {IMUI} = this.$refs;
IMUI.appendMessage(data.body);
IMUI.messageViewToBottom()
}
});
@@ -97,8 +98,6 @@
console.log('发送了信息')
message.handlerType = '6'
webSocketManager.sendMessage(JSON.stringify(message))
//执行到next消息会停止转圈如果接口调用失败可以修改消息的状态 next({status:'failed'});
next();
},