liuyu 4 năm trước cách đây
mục cha
commit
f4a6e85124
2 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 14 0
      src/layout/live/detailInfo.vue
  2. 4 0
      src/store/room.js

+ 14 - 0
src/layout/live/detailInfo.vue

@@ -40,6 +40,7 @@
         <el-col :span="20" class="right">
           <el-col :span="24" class="rightTop">
             <span @click="liveon"><i class="iconfont iconshexiangtou"></i>直播</span>
+            <span @click="livezhuchi"><i class="iconfont iconshexiangtou"></i>主持</span>
             <span @click="liveclose"><i class="el-icon-switch-button"></i>关闭</span>
             <span @click="shareon"><i class="iconfont iconfenxiang"></i>屏幕</span>
             <span><el-switch @change="recordclick" v-model="isrecord" active-text="录制" inactive-text="停录"> </el-switch></span>
@@ -216,9 +217,22 @@ export default {
       updateanchor: 'updateanchor',
       updateshmai: 'updateshmai',
       switchzjr: 'switchzjr',
+      switchzb: 'switchzb',
     }),
     ...lookuser(['lookquery', 'lookupdate']),
     ...roomuser({ roomuserfetch: 'fetch' }),
+    async livezhuchi() {
+      const data = {};
+      data.id = this.id;
+      const res = await this.switchzb(data);
+      if (this.$checkRes(res)) {
+        console.log(res.data);
+        this.$message({
+          message: '操作成功',
+          type: 'success',
+        });
+      }
+    },
     async zjrChange(zjrid) {
       const data = {};
       data.id = this.id;

+ 4 - 0
src/store/room.js

@@ -73,6 +73,10 @@ const actions = {
     const res = await this.$axios.$post(`${api.roomInfo}/switchzjr`, info);
     return res;
   },
+  async switchzb({ commit }, info) {
+    const res = await this.$axios.$post(`${api.roomInfo}/switchzb`, info);
+    return res;
+  },
 };
 
 export default {