|
@@ -29,6 +29,16 @@
|
|
|
placeholder="直播间编号/标题"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item prop="popularize">
|
|
|
+ <el-select
|
|
|
+ placeholder="是否推广"
|
|
|
+ v-model="searchForm.popularize"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="否" value="0"></el-option>
|
|
|
+ <el-option label="是" value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item prop="liveState">
|
|
|
<el-select
|
|
|
placeholder="直播状态"
|
|
@@ -92,6 +102,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column align="center" prop="popularize" label="是否推广">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.popularize == 1 ? "是" : "否" }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" prop="liveState" label="直播状态">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -108,6 +125,11 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<auth auths="imLiveBroadcastRoom/roomDestroy">
|
|
|
+ <el-button type="text" @click="popularizeRoom(scope.row)">{{
|
|
|
+ scope.row.popularize == 1 ? "取消推广" : "首页推广"
|
|
|
+ }}</el-button>
|
|
|
+ </auth>
|
|
|
+ <auth auths="imLiveBroadcastRoom/roomDestroy">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-if="scope.row.liveState == 1"
|
|
@@ -116,7 +138,10 @@
|
|
|
>
|
|
|
</auth>
|
|
|
|
|
|
- <el-button type="text" v-if="scope.row.liveState == 2" @click="gotoDetail(scope.row)"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="scope.row.liveState == 2"
|
|
|
+ @click="gotoDetail(scope.row)"
|
|
|
>直播详情</el-button
|
|
|
>
|
|
|
<auth auths="imLiveBroadcastRoom/shareGroup">
|
|
@@ -177,6 +202,7 @@ import {
|
|
|
getLiveBroadcastList,
|
|
|
delLiveBroadcast,
|
|
|
closeBroadcastRoomList,
|
|
|
+ opsPopularize,
|
|
|
} from "./api";
|
|
|
export default {
|
|
|
components: { pagination, shareDetail },
|
|
@@ -186,6 +212,7 @@ export default {
|
|
|
search: null,
|
|
|
timer: [],
|
|
|
liveState: null,
|
|
|
+ popularize: null,
|
|
|
},
|
|
|
|
|
|
tableList: [],
|
|
@@ -249,7 +276,7 @@ export default {
|
|
|
gotoDetail(row) {
|
|
|
this.$router.push({
|
|
|
path: "/business/liveClassDetail",
|
|
|
- query: {roomUid:row.roomUid},
|
|
|
+ query: { roomUid: row.roomUid },
|
|
|
});
|
|
|
},
|
|
|
shareLive(row) {
|
|
@@ -294,6 +321,34 @@ export default {
|
|
|
} catch (e) {}
|
|
|
});
|
|
|
},
|
|
|
+ async popularizeRoom(row) {
|
|
|
+ let popularize,str;
|
|
|
+ if (row.popularize) {
|
|
|
+ popularize = 0;
|
|
|
+ str='取消推广'
|
|
|
+ } else {
|
|
|
+ popularize = 1;
|
|
|
+ str='推广'
|
|
|
+ }
|
|
|
+ this.$confirm(`您是否${str}直播间"${row.roomTitle}"`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ try {
|
|
|
+ const res = await opsPopularize({
|
|
|
+ popularize,
|
|
|
+ id: row.id,
|
|
|
+ });
|
|
|
+ this.$message.success(`${str}成功`);
|
|
|
+ this.getList();
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|