|
@@ -52,7 +52,7 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-button v-if="`${scope.row.is_publish}` === '1'" size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">
|
|
|
+ <el-button v-if="`${scope.row.is_publish}` === '1'" size="mini" type="text" @click="toPublish(scope.row.id, scope.row.is_publish)">
|
|
|
取消发布
|
|
|
</el-button>
|
|
|
<el-button v-else size="mini" type="text" @click="toPublish(scope.row.id, scope.row.is_publish)">
|
|
@@ -149,10 +149,10 @@ export default {
|
|
|
async toPublish(id, state) {
|
|
|
let result = await this.postOperation({ type: 'update', data: { id: id, info: { is_publish: `${state}` === '0' ? 1 : 0 } } });
|
|
|
if (`${result.errcode}` === '0') {
|
|
|
- this.$message.success('发布成功');
|
|
|
+ this.$message.success('操作成功');
|
|
|
this.search();
|
|
|
} else {
|
|
|
- this.$message.error(result.errmsg ? result.errmsg : '发布失败');
|
|
|
+ this.$message.error(result.errmsg ? result.errmsg : '操作失败');
|
|
|
}
|
|
|
},
|
|
|
},
|