Sfoglia il codice sorgente

直播-发送红包修改

Long 2 mesi fa
parent
commit
494e1a4c43

+ 3 - 0
.env.development

@@ -17,3 +17,6 @@ VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 直播webSocket地址
+VUE_APP_LIVE_WS_URL = 'ws://127.0.0.1:7114'

+ 5 - 1
src/views/live/liveConfig/liveRedConf.vue

@@ -327,7 +327,11 @@ export default {
       };
       updateLiveRedConf(doRedParam).then(response => {
         if(response.code === 200){
-          this.$store.state.liveWs.sendWs("red",response.msg, row.redId,this.liveId);
+          const msg = {
+            cmd: 'red',
+            data: doRedParam
+          }
+          this.$store.state.liveWs.send(JSON.stringify(msg));
           this.msgSuccess("修改成功");
         }else{
           this.msgError(response.msg);

+ 1 - 6
src/views/live/liveConsole/index.vue

@@ -416,12 +416,7 @@ export default {
     },
 
     handleClickRed(){
-      this.$router.push({
-        name: 'LiveRedConf',
-        query: {
-          liveId: this.liveId
-        }
-      })
+      this.$router.push('/live/liveConfig/' + this.liveId)
     },
     handleClickLottery(){
       this.$router.push({