Commit a3095a01 authored by chenqikuai's avatar chenqikuai

fix: 专辑删除

parent 977b966d
......@@ -46,37 +46,23 @@ const renameAlbum = (albumMsg: any) => {
};
const deleteAlbum = async (item: any) => {
const res = await $ajax({
url: URLS.files,
type: "get",
params: {
category_id: item.id as string,
page: 1,
page_size: 10,
img_width: 70,
},
});
if (res?.code === 200 && res.data.total === 0) {
showTip(
"确认删除此专辑及专辑内全部内容吗?删除后无法找回,请谨慎操作。",
async () => {
const ret = await $ajax({
url: URLS.categories,
type: "delete",
params: {
ids: [item.id],
},
});
console.log(ret, "show ret");
if (ret && ret!.code === 200) {
ElMessage.success("删除成功");
emit("update");
}
showTip(
"确认删除此专辑及专辑内全部内容吗?删除后无法找回,请谨慎操作。",
async () => {
const ret = await $ajax({
url: URLS.categories,
type: "delete",
params: {
ids: [item.id],
},
});
console.log(ret, "show ret");
if (ret && ret!.code === 200) {
ElMessage.success("删除成功");
emit("update");
}
);
} else {
showTip("请先将专辑内的藏品删除后,在删除专辑。", async () => {});
}
}
);
};
const confirmRename = async (name: string) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment