优化收藏

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

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

Loading…
Cancel
Save