ソースを参照

销售直播代码 直播间 根据liveId保存连接

yuhongqi 3 週間 前
コミット
d22c1a6002

+ 4 - 2
src/views/live/liveConsole/index.vue

@@ -619,7 +619,6 @@ export default {
           }
           delete message.params
           this.msgList.push(message)
-
           // 移动到底部
           this.$nextTick(() => {
             setTimeout(() => {
@@ -628,12 +627,15 @@ export default {
           })
         }
         else if (cmd === 'entry' || cmd === 'out') {
-
           let user = data
           if(this.userList.length > 0){
             this.userList = this.userList.filter(u => u.userId !== user.userId)
           }
           this.userList.push(user)
+        } else if (cmd === 'live_start') {
+          this.msgSuccess("直播开始了!");
+        } else if (cmd === 'live_end') {
+          this.msgError("直播已结束!");
         }
       }
     },

+ 1 - 1
src/views/live/liveLotteryConf/index.vue

@@ -693,7 +693,7 @@ export default {
       };
       updateLiveLotteryConf(doLotteryParam).then(response => {
         if(response.code === 200){
-          this.$store.state.liveWs.sendWs("lottery",response.msg, row.lotteryId,this.liveId);
+          this.$store.state.liveWs[this.liveId].sendWs("lottery",response.msg, row.lotteryId,this.liveId);
           this.msgSuccess("修改成功");
         }else{
           this.msgError(response.msg);

+ 1 - 1
src/views/live/liveRedConf/index.vue

@@ -323,7 +323,7 @@ export default {
       };
       updateLiveRedConf(doRedParam).then(response => {
         if(response.code === 200){
-          this.$store.state.liveWs.sendWs("red",response.msg, row.redId,this.liveId);
+          this.$store.state.liveWs[this.liveId].sendWs("red",response.msg, row.redId,this.liveId);
           this.msgSuccess("修改成功");
         }else{
           this.msgError(response.msg);