官方客服代码优化
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
Reference in New Issue
Block a user