This commit is contained in:
2020-08-13 16:03:01 +08:00
parent 4413250c40
commit ca9b43a597
2 changed files with 33 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ function IMService() {
host:'hangzhou.goeasy.io',//qos=1
appkey:'BC-453aa755c4ea48148abefc55a86df283'
});
this.status = false
//当前“我”
this.currentUser = null;
//我的好友
@@ -236,10 +237,12 @@ IMService.prototype.connectIM = function () {
IMService.prototype.initialIMListeners = function () {
this.im.on(GoEasyIM.EVENT.CONNECTED, () => {
console.log('连接成功.')
this.status = true
});
this.im.on(GoEasyIM.EVENT.DISCONNECTED, () => {
console.log('连接断开.')
this.status = false
});
//监听好友上下线