Compare commits

..

No commits in common. "6a361e3245e30df5ffbb1169f053b489ef354a31" and "0bc6be9b9f5b2998c8be8dfec52c90908cf232ba" have entirely different histories.

2 changed files with 8 additions and 40 deletions

View File

@ -179,7 +179,6 @@
})
return false
} else {
console.log(123)
me.loginIn(res.data.token); //
//
uni.setStorageSync('user_info',res.data);

View File

@ -336,13 +336,10 @@ export default {
};
},
onLoad(a) {
this.url = a.url;
this.id = a.id
console.log(this.url);
let that = this;
uni.getSystemInfo({
success(a) {
console.log(a.windowHeight);
@ -404,7 +401,6 @@ export default {
}
})
//当前用户
try {
uni.request({
url:"https://dmmall.sdbairui.com/api/Member/MemberInfo",
method:"POST",
@ -414,52 +410,26 @@ export default {
success(res){
console.log(res,111)
var currentUser = {
id : res.data.data.MemberArray.member_mobile + "",
nickname : res.data.data.MemberArray.member_nickname,
avatar: res.data.data.MemberArray.member_avatar
id : "12",
nickname :"123",
avatar: "1223"
};
var room = {
id : a.id + "",
name : a.id + ""
id : "123",
name : "123"
};
console.log(room,currentUser)
//构造chatRoomService
that.chatRoomService = new ChatRoomService(room, currentUser);
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
that.chatRoomService.connectGoEasyIM();
//获取当前聊天室数据
that.room = that.chatRoomService.room;
setTimeout(function() {
that.chatRoomService.quitRoom();
that.chatRoomService = {}
}, 1000);
setTimeout(function(){
that.chatRoomService = new ChatRoomService(room, currentUser);
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
that.chatRoomService.connectGoEasyIM();
//获取当前聊天室数据
that.room = that.chatRoomService.room;
}, 2000);
}
})
} catch (error) {
console.log("错误")
}
},
onBackPress () {//返回取消订阅
//断开连接
this.chatRoomService.quitRoom();
},
beforeDestroy () {
this.chatRoomService.quitRoom();
},
methods:{
sendMessage (messageType, content) {//发送消息
@ -482,7 +452,6 @@ export default {
// }, 300)
console.log(message)
this.danmulist.push(message)
if(this.danmulist.length > 7){
this.danmulist = this.danmulist.slice(this.danmulist.length - 7)
}