修复链接失败

This commit is contained in:
luyuan 2020-08-17 09:44:47 +08:00
parent 33e8942180
commit 3be650b24e
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -273,7 +273,7 @@ import chatVue from '../../pageD/chat/chat.vue'
// this.isNewmembervoucher();
// }
},
onLoad(){
async onLoad(){
this.getSwiper();
//
if(this.$store.state.hasLogin){
@ -281,24 +281,28 @@ import chatVue from '../../pageD/chat/chat.vue'
const user = uni.getStorageSync('user_info');
// console.log(user)
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
this.imService.connectIM()
await this.imService.connectIM()
}else{
this.$u.api.getDefaultAvatar().then((res)=>{
await this.$u.api.getDefaultAvatar().then((res)=>{
console.log(res)
uni.setStorageSync("morenimg",res.data.avatar)
this.imService.login(new Date().getTime(),"123",res.data.avatar)
this.imService.connectIM()
console.log("用户信息")
})
console.log("链接")
await this.imService.connectIM()
}
console.log("1212")
let that = this
setTimeout(function(){
that.imService.disconnect()
// console.log("guanbi")
},1000)
setTimeout(function(){
// console.log("lianjie")
that.imService.connectIM()
setTimeout(function(){
that.imService.disconnect()
console.log("guanbi")
},1000)
setTimeout(function(){
console.log("lianjie")
that.imService.connectIM()
},2000)
},
onPullDownRefresh() {