问答,管理删除,减U币

This commit is contained in:
daihh
2022-10-22 12:19:00 +08:00
parent cb9873ceec
commit 55bcb9afcd

View File

@@ -39,7 +39,7 @@
<!-- <div style="padding: 0px 5px;"><el-button icon="el-icon-search" @click="getQaList" type="primary" >搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div> -->
<div style="display: flex;justify-content: flex-start;align-items: center;">
<el-button style="margin-left:0px" type="success" @click="setEssence('set')" >设置精华</el-button>
<el-button type="warning" @click="setEssence('cancel')" >取消精华</el-button>
<div style="padding-left:10px"><el-checkbox v-model="queryObj.isEssence" @change="isEssenceChange()">精华问题</el-checkbox></div>
@@ -208,22 +208,14 @@ export default {
//接口删除问答单条数据
delQaList(data) {
const { id } = data;
apiQa
.del(id)
.then(res => {
apiQa.del(id).then(res => {
if (res.status == 200) {
this.getQaList();
this.$message({
type: 'success',
message: '删除成功'
});
this.$message({ type: 'success', message: '删除成功' });
let event = {
key: "DeleteQuestion",//后台的事件key 发布文章且审核通过
title: '删除问题',//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: '删除问题',//事件的内容
key: "QuestionDelete",//被管理员删除
title: '被管理员删除问题',//事件的标题
parameters:"author:"+data.sysCreateAid,//用户自定义参数 name:value,name:value
content: '被管理员删除问题',//事件的内容
objId: data.id,//关联的id
objType: "3",//关联的类型
objInfo:data.title,
@@ -232,6 +224,7 @@ export default {
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
this.getQaList();
}
})
.catch(err => {
@@ -250,7 +243,7 @@ export default {
type: 'warning'
}).then(() => {
this.delQaList(item);
});
},
//设置单挑数据