Commit 55d2c52c by 李嘉林

用户进入通知

parent 83d36032
...@@ -170,9 +170,11 @@ export default { ...@@ -170,9 +170,11 @@ export default {
}); });
} }
this.init(); this.init();
setTimeout(() => {
this.infoTiming = setInterval(() => { this.infoTiming = setInterval(() => {
this.timingGetInfo(); this.timingGetInfo();
}, 5000); }, 5000);
}, 2000);
this.userEntry("IN"); this.userEntry("IN");
// 通过分享进入直播间重新查询订阅消息配置 // 通过分享进入直播间重新查询订阅消息配置
...@@ -340,19 +342,6 @@ export default { ...@@ -340,19 +342,6 @@ export default {
this.liveNoticeInfo.liveBroadcastState == 1 && this.liveNoticeInfo.liveBroadcastState == 1 &&
resData.liveState == "IN_LIVE" resData.liveState == "IN_LIVE"
) { ) {
// 直播中且接口直播中---主要操作
// 数据初始化
this.entryNoticeText = "";
this.liveNoticeInfo.watchNum = resData.watchNum; //观看人数
if (resData.entryNoticeList.length > 0) {
if (resData.entryNoticeList.length == 1) {
this.entryNoticeText = `${resData.entryNoticeList[0].userName}`; //用户进入
} else {
this.entryNoticeText = `${
resData.entryNoticeList[0].userName
}${resData.entryNoticeList.length}人`; //用户进入
}
}
} else if ( } else if (
this.liveNoticeInfo.liveBroadcastState == 0 && this.liveNoticeInfo.liveBroadcastState == 0 &&
resData.liveState == "IN_LIVE" resData.liveState == "IN_LIVE"
...@@ -391,6 +380,19 @@ export default { ...@@ -391,6 +380,19 @@ export default {
} }
this.guestBookList = resData.guestBookList; //评论列表 this.guestBookList = resData.guestBookList; //评论列表
this.likeInfo = resData.likeInfo; //点赞信息 this.likeInfo = resData.likeInfo; //点赞信息
// 直播中且接口直播中---主要操作
// 数据初始化
this.entryNoticeText = "";
this.liveNoticeInfo.watchNum = resData.watchNum; //观看人数
if (resData.entryNoticeList.length > 0) {
if (resData.entryNoticeList.length == 1) {
this.entryNoticeText = `${resData.entryNoticeList[0].userName}`; //用户进入
} else {
this.entryNoticeText = `${
resData.entryNoticeList[0].userName
}${resData.entryNoticeList.length}人`; //用户进入
}
}
this.updateVal = Math.random(); //监听使用数据 this.updateVal = Math.random(); //监听使用数据
} else { } else {
if (this.infoTiming) { if (this.infoTiming) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment