优化收藏

hn2.0
fanluyan 2 years ago
parent 7f97e2b080
commit e4883fb24f

@ -816,8 +816,7 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
}).then(() => {
this.collectFlag = true;
addFavorList({ list: [this.zztermId], type: 1 }).then((res) => {
this.getupdateFavorTreeList();
@ -826,12 +825,6 @@ export default {
type: "success",
message: "添加成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消该操作",
});
});
} else {
this.$confirm("此操作将取消收藏, 是否继续?", "提示", {
@ -841,16 +834,11 @@ export default {
}).then(() => {
this.collectFlag = false;
addFavorList({ list: [this.zztermId], type: 0 }).then((res) => {
this.getFavorTreeList();
this.getupdateFavorTreeList();
});
this.$message({
type: "success",
message: "取消收藏!",
}).catch(() => {
this.$message({
type: "info",
message: "已取消该操作",
});
});
});
}

Loading…
Cancel
Save