|
@@ -79,7 +79,7 @@
|
|
|
<text class="avatar-initial">{{ getNicknameInitial(item.nickName) }}</text>
|
|
<text class="avatar-initial">{{ getNicknameInitial(item.nickName) }}</text>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="viewer-count ">{{virtualHuman || 0 }}</view>
|
|
|
|
|
|
|
+ <view class="viewer-count ">{{formattedWatchCount || 0 }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -687,6 +687,7 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ isNow:false,
|
|
|
fakeAvatar: Array.from({
|
|
fakeAvatar: Array.from({
|
|
|
length: 11
|
|
length: 11
|
|
|
}, (_, i) =>
|
|
}, (_, i) =>
|
|
@@ -927,7 +928,6 @@
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
console.log("手机型号是>>>>", this.systemInfo.model)
|
|
console.log("手机型号是>>>>", this.systemInfo.model)
|
|
|
- console.log("手机高度是>>>>", this.systemInfo.model)
|
|
|
|
|
// Android处理保持原有逻辑
|
|
// Android处理保持原有逻辑
|
|
|
if (res.height > 0) {
|
|
if (res.height > 0) {
|
|
|
this.isKeyboardShow = true;
|
|
this.isKeyboardShow = true;
|
|
@@ -1036,6 +1036,9 @@
|
|
|
this.totalTraffic = 0;
|
|
this.totalTraffic = 0;
|
|
|
}
|
|
}
|
|
|
this.startTimer();
|
|
this.startTimer();
|
|
|
|
|
+ if(!this.isNow){
|
|
|
|
|
+ this.userlogo = true
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//分享给好友
|
|
//分享给好友
|
|
@@ -1064,9 +1067,9 @@
|
|
|
return this.$store.state.appid
|
|
return this.$store.state.appid
|
|
|
},
|
|
},
|
|
|
// 观看人数
|
|
// 观看人数
|
|
|
- // formattedWatchCount() {
|
|
|
|
|
- // return this.formatNumber(this.liveUserTotal || 0);
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ formattedWatchCount() {
|
|
|
|
|
+ return this.formatNumber(this.virtualHuman || 0);
|
|
|
|
|
+ },
|
|
|
//点赞人数
|
|
//点赞人数
|
|
|
formattedLikeCount() {
|
|
formattedLikeCount() {
|
|
|
return this.formatNumber(this.liveViewData.like || 0);
|
|
return this.formatNumber(this.liveViewData.like || 0);
|
|
@@ -1676,7 +1679,7 @@
|
|
|
|
|
|
|
|
// 强制滚动到底部(备用方案)
|
|
// 强制滚动到底部(备用方案)
|
|
|
forceScrollToBottom() {
|
|
forceScrollToBottom() {
|
|
|
- console.log('执行强制滚动到底部');
|
|
|
|
|
|
|
+ // console.log('执行强制滚动到底部');
|
|
|
|
|
|
|
|
// 方案1:直接设置一个很大的scrollTop值
|
|
// 方案1:直接设置一个很大的scrollTop值
|
|
|
this.scrollTop = 999999;
|
|
this.scrollTop = 999999;
|
|
@@ -1753,7 +1756,7 @@
|
|
|
|
|
|
|
|
// 强制滚动到底部(用于发送消息,绕过防抖限制)
|
|
// 强制滚动到底部(用于发送消息,绕过防抖限制)
|
|
|
forceScrollToBottomOnSend() {
|
|
forceScrollToBottomOnSend() {
|
|
|
- console.log('执行强制滚动到底部(发送消息专用)');
|
|
|
|
|
|
|
+ // console.log('执行强制滚动到底部(发送消息专用)');
|
|
|
|
|
|
|
|
// 清理之前的定时器
|
|
// 清理之前的定时器
|
|
|
if (this.scrollTimer) {
|
|
if (this.scrollTimer) {
|
|
@@ -2257,6 +2260,7 @@
|
|
|
(res) => {
|
|
(res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
this.userInfo = res.user;
|
|
this.userInfo = res.user;
|
|
|
|
|
+ this.isNow = dayjs(this.userInfo.updateTime).isSame(dayjs(), 'day')
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -2982,10 +2986,8 @@
|
|
|
this.isShowLottery = this.lotteryInfo && this.lotteryInfo.lotteryStatus == 1;
|
|
this.isShowLottery = this.lotteryInfo && this.lotteryInfo.lotteryStatus == 1;
|
|
|
|
|
|
|
|
if (this.notice.msg) {
|
|
if (this.notice.msg) {
|
|
|
- console.log("有》》》》")
|
|
|
|
|
this.noticeTimer = setInterval(() => {
|
|
this.noticeTimer = setInterval(() => {
|
|
|
const noticeCountdown = this.handleTime(this.notice.endTime, 0);
|
|
const noticeCountdown = this.handleTime(this.notice.endTime, 0);
|
|
|
- console.log("出现1>>>", noticeCountdown)
|
|
|
|
|
if (!noticeCountdown) {
|
|
if (!noticeCountdown) {
|
|
|
this.isShowNotice = false;
|
|
this.isShowNotice = false;
|
|
|
clearInterval(this.noticeTimer);
|
|
clearInterval(this.noticeTimer);
|
|
@@ -3110,7 +3112,6 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
pauseVideo() {
|
|
pauseVideo() {
|
|
|
- console.log("暂停了")
|
|
|
|
|
if (!this.liveItem) return;
|
|
if (!this.liveItem) return;
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -3660,10 +3661,6 @@
|
|
|
// 清除之前的重连定时器
|
|
// 清除之前的重连定时器
|
|
|
this.resetReconnectState();
|
|
this.resetReconnectState();
|
|
|
|
|
|
|
|
- // setTimeout(() => {
|
|
|
|
|
- // this.getliveUser(false);
|
|
|
|
|
- // }, 1000);
|
|
|
|
|
-
|
|
|
|
|
const now = new Date();
|
|
const now = new Date();
|
|
|
this.timestamp = now.getTime(); // 生成签名
|
|
this.timestamp = now.getTime(); // 生成签名
|
|
|
const signature = CryptoJS.HmacSHA256(
|
|
const signature = CryptoJS.HmacSHA256(
|
|
@@ -3986,21 +3983,17 @@
|
|
|
}
|
|
}
|
|
|
} else if (socketMessage.cmd == 'globalVisible' || socketMessage.cmd == 'singleVisible') {
|
|
} else if (socketMessage.cmd == 'globalVisible' || socketMessage.cmd == 'singleVisible') {
|
|
|
// status = 1的时候,用户消息自可见,其他消息丢失}
|
|
// status = 1的时候,用户消息自可见,其他消息丢失}
|
|
|
- console.log("可见性>>>>>", socketMessage)
|
|
|
|
|
if (socketMessage.status == 1) {
|
|
if (socketMessage.status == 1) {
|
|
|
- console.log("不可见性")
|
|
|
|
|
this.myselfFlag = true;
|
|
this.myselfFlag = true;
|
|
|
} else {
|
|
} else {
|
|
|
this.myselfFlag = false;
|
|
this.myselfFlag = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else if (socketMessage.cmd == 'sendPopMsg') {
|
|
} else if (socketMessage.cmd == 'sendPopMsg') {
|
|
|
- console.log("弹窗消息>>>>", socketMessage)
|
|
|
|
|
this.popMsg = socketMessage.msg
|
|
this.popMsg = socketMessage.msg
|
|
|
this.isShowPopMsg = true
|
|
this.isShowPopMsg = true
|
|
|
} else if (socketMessage.cmd == 'sendTopMsg') {
|
|
} else if (socketMessage.cmd == 'sendTopMsg') {
|
|
|
clearInterval(this.noticeTimer);
|
|
clearInterval(this.noticeTimer);
|
|
|
- console.log("公告消息>>>>", socketMessage)
|
|
|
|
|
const noticeData = socketMessage.data ? JSON.parse(socketMessage.data) : {};
|
|
const noticeData = socketMessage.data ? JSON.parse(socketMessage.data) : {};
|
|
|
this.notice = noticeData || {};
|
|
this.notice = noticeData || {};
|
|
|
this.isShowNotice = true
|
|
this.isShowNotice = true
|
|
@@ -4017,7 +4010,6 @@
|
|
|
} else if (socketMessage.cmd == 'entry') {
|
|
} else if (socketMessage.cmd == 'entry') {
|
|
|
try {
|
|
try {
|
|
|
if (!this.liveUserCalled) {
|
|
if (!this.liveUserCalled) {
|
|
|
- // await this.getliveUser(false);
|
|
|
|
|
this.liveUserCalled = true;
|
|
this.liveUserCalled = true;
|
|
|
}
|
|
}
|
|
|
const userIdToEntry = socketMessage.userId;
|
|
const userIdToEntry = socketMessage.userId;
|