临时测试
This commit is contained in:
@@ -271,6 +271,7 @@
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const ChatRoomService =require('../../static/chatservice');
|
||||
export default {
|
||||
data: {
|
||||
fil: true,
|
||||
@@ -361,17 +362,27 @@
|
||||
console.log(res.data)
|
||||
that.info = res.data.data.memberInfo
|
||||
|
||||
|
||||
console.log(uni.getStorageSync('userinfo'),123)
|
||||
//当前用户
|
||||
var currentUser = {
|
||||
id : Date.parse(new Date()) + "",
|
||||
nickname : res.data.data.memberInfo.member_nickname + "",
|
||||
avatar: res.data.data.memberInfo.member_avatar
|
||||
};
|
||||
|
||||
var room = {
|
||||
id : a.id + "",
|
||||
name : a.id + ""
|
||||
};
|
||||
|
||||
that.chatRoomService = getApp().globalData.im
|
||||
console.log(room,currentUser)
|
||||
//构造chatRoomService
|
||||
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
||||
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||
//获取当前聊天室数据
|
||||
that.room = that.chatRoomService.room;
|
||||
}
|
||||
})
|
||||
this.chatRoomService = getApp().globalData.im
|
||||
this.chatRoomService.subscribeGroupMessage(a.id)
|
||||
let shi = 0;
|
||||
let fen = 0;
|
||||
let miao = 0;
|
||||
|
||||
Reference in New Issue
Block a user