xbx #210
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}" @error="errors>
|
||||
<video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}" @error="errors" >
|
||||
|
||||
</video>
|
||||
<view class="user" :style="{'top': top}">
|
||||
@ -418,41 +418,37 @@ export default {
|
||||
}
|
||||
})
|
||||
//当前用户
|
||||
try {
|
||||
uni.request({
|
||||
url:"https://dmmall.sdbairui.com/api/Member/MemberInfo",
|
||||
method:"POST",
|
||||
header:{
|
||||
'Authorization' : 'Bearer' + " " + token
|
||||
},
|
||||
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
|
||||
};
|
||||
|
||||
var room = {
|
||||
id : a.rid + "",
|
||||
name : a.rid + ""
|
||||
};
|
||||
that.chatRoomService = getApp().globalData.im
|
||||
console.log(room,currentUser)
|
||||
//构造chatRoomService
|
||||
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
||||
//获取当前聊天室数据
|
||||
that.room = that.chatRoomService.room;
|
||||
that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
|
||||
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||
this.$forceUpdate();
|
||||
console.log(that.room)
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.log("错误")
|
||||
var currentUser = {}
|
||||
if(this.$store.state.hasLogin){
|
||||
const user = uni.getStorageSync('user_info');
|
||||
currentUser = {
|
||||
id : user.member.member_id,
|
||||
nickname : user.member.member_nickname,
|
||||
avatar: user.member.member_avatar
|
||||
};
|
||||
}else{
|
||||
const user = uni.getStorageSync('morenimg');
|
||||
currentUser = {
|
||||
id : new Date().getTime(),
|
||||
nickname : "123",
|
||||
avatar: user
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var room = {
|
||||
id : a.rid + "",
|
||||
name : a.rid + ""
|
||||
};
|
||||
that.chatRoomService = getApp().globalData.im
|
||||
console.log(room,currentUser)
|
||||
//构造chatRoomService
|
||||
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
||||
//获取当前聊天室数据
|
||||
that.room = that.chatRoomService.room;
|
||||
that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
|
||||
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||
this.$forceUpdate();
|
||||
console.log(that.room)
|
||||
|
||||
},
|
||||
onBackPress () {//返回取消订阅
|
||||
|
Loading…
Reference in New Issue
Block a user