123
This commit is contained in:
@@ -43,6 +43,14 @@ export function updateAnchor(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function updateVideoStatusOnline(data) {
|
||||
return request({
|
||||
url: '/cai/anchor/updateVideoStatusOnline',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除女神列表
|
||||
export function delAnchor(id) {
|
||||
return request({
|
||||
|
||||
@@ -103,7 +103,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="视频状态" align="center" prop="videoStatus" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="videoStatusList" :value="scope.row.videoStatus" />
|
||||
<el-tag :key="1" :index="1" type="danger" v-if="scope.row.videoStatus === 1" class="click-class" @click="updateVideoStatusHandle(scope.row)">视频中</el-tag>
|
||||
<el-tag :key="2" :index="2" type="info" v-if="scope.row.videoStatus === 0">休息中</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="首页展示" align="center" prop="indexDisplay" >
|
||||
@@ -187,7 +188,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {delAnchor, listAnchor, updateAnchor} from '@/api/cai/anchor'
|
||||
import {delAnchor, listAnchor, updateAnchor, updateVideoStatusOnline} from '@/api/cai/anchor'
|
||||
import {genderList, onlineStatusList, userStatusList, videoStatusList} from '@/constant/statusMap'
|
||||
import AddAnchorDialog from "@/views/cai/anchor/add-anchor-dialog";
|
||||
import UpdateAnchorDialog from "@/views/cai/anchor/update-anchor-dialog";
|
||||
@@ -300,6 +301,19 @@ export default {
|
||||
row.openVideoStatus = row.openVideoStatus === 1 ? 0 : 1
|
||||
})
|
||||
},
|
||||
updateVideoStatusHandle(row){
|
||||
this.$confirm('确认把主播[' + row.nickname + ']状态切换为休闲吗?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
return updateVideoStatusOnline({ id: row.userId})
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
}).catch(function() {
|
||||
})
|
||||
},
|
||||
handleIndexDisplayChange(row){
|
||||
let text = row.indexDisplay === 0 ? '封禁' : '恢复'
|
||||
this.$confirm('确认要' + text + '[' + row.nickname + ']首页展示吗?', '警告', {
|
||||
@@ -357,3 +371,9 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.click-class {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user