浏览代码

直播详情和回放

1
mo 3 年之前
父节点
当前提交
864d936f55
共有 2 个文件被更改,包括 40 次插入4 次删除
  1. 38 3
      src/views/liveClassManager/liveClassDetail.vue
  2. 2 1
      src/views/liveClassManager/modals/shareDetail.vue

+ 38 - 3
src/views/liveClassManager/liveClassDetail.vue

@@ -16,7 +16,7 @@
           <p class="teacherName sub">
             主题:<span>{{ detail.roomTitle }}</span>
           </p>
-          <el-button type="text" class="fontBtn"
+          <el-button type="text" class="fontBtn" @click="payVisible = true"
             >直播回放 <i class="el-icon-video-play"></i
           ></el-button>
         </el-row>
@@ -107,6 +107,29 @@
         />
       </div>
     </div>
+    <el-dialog
+      :visible.sync="payVisible"
+      v-if="payVisible"
+      width="500px"
+      title="直播回放"
+    >
+      <div  class="lineWrap">
+        <el-link
+        :underline="false"
+         v-for="(item, index) in videoList"
+          :key="index"
+          type="text"
+          class="line"
+          @click="opneVideo(item)"
+          >{{ item.endTime | dateForMinFormat }}</el-link
+        >
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button @click="payVisible = false">取 消</el-button> -->
+        <el-button type="primary" @click="payVisible = false">确 定</el-button>
+      </div></el-dialog
+    >
   </div>
 </template>
 <script>
@@ -138,6 +161,8 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
+      videoList: [],
+      payVisible: false,
     };
   },
   mounted() {
@@ -161,7 +186,7 @@ export default {
         };
         const res = await getLiveBroadcastRoomDetailList(obj);
         this.tableList = res.data.rows;
-        this.rules.total = res.data.total
+        this.rules.total = res.data.total;
       } catch (e) {
         console.log(e);
       }
@@ -173,11 +198,15 @@ export default {
         };
 
         const res = await getLiveBroadcastRoomDetail(obj);
-        this.detail = {...res.data}
+        this.detail = { ...res.data };
+        this.videoList = res.data.videoList;
       } catch (e) {
         console.log(e);
       }
     },
+    opneVideo(row){
+      window.open(row.url)
+    }
   },
 };
 </script>
@@ -238,4 +267,10 @@ export default {
 .statistic .statistic-content > span {
   font-size: 16px;
 }
+.lineWrap {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  flex-wrap: wrap;
+}
 </style>

+ 2 - 1
src/views/liveClassManager/modals/shareDetail.vue

@@ -81,7 +81,7 @@ export default {
     this.Teacherurl = domain
       ? domain + `/live/?roomUid=${this.row.roomUid}`
       : "https://test.dayaedu.com" + `/live/?roomUid=${this.row.roomUid}`;
-      this.copyText()
+      // this.copyText()
   },
   methods: {
     copyText(e) {
@@ -102,6 +102,7 @@ export default {
 
       var clipboard = new Clipboard(".shareText", {
         text: function (trigger) {
+          // console.log(trigger,text)
           return text;
         },
       });