xbx #210

Merged
theluyuan merged 6 commits from xbx into master 2020-08-15 07:48:12 +00:00
Showing only changes of commit 6f0ed8e3f9 - Show all commits

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <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> </video>
<view class="user" :style="{'top': top}"> <view class="user" :style="{'top': top}">
@ -418,41 +418,37 @@ export default {
} }
}) })
//当前用户 //当前用户
try { var currentUser = {}
uni.request({ if(this.$store.state.hasLogin){
url:"https://dmmall.sdbairui.com/api/Member/MemberInfo", const user = uni.getStorageSync('user_info');
method:"POST", currentUser = {
header:{ id : user.member.member_id,
'Authorization' : 'Bearer' + " " + token nickname : user.member.member_nickname,
}, avatar: user.member.member_avatar
success(res){ };
console.log(res,111) }else{
var currentUser = { const user = uni.getStorageSync('morenimg');
id : res.data.data.MemberArray.member_mobile + "", currentUser = {
nickname : res.data.data.MemberArray.member_nickname, id : new Date().getTime(),
avatar: res.data.data.MemberArray.member_avatar 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)
}
})
} catch (error) {
console.log("错误")
} }
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 () {//返回取消订阅 onBackPress () {//返回取消订阅