no message

This commit is contained in:
A1300399510
2024-01-09 18:49:37 +08:00
parent 9958609ae6
commit f90cd62cc2
7 changed files with 74 additions and 37 deletions

View File

@@ -38,7 +38,7 @@
</div>
</div>
<div class="operate-area flexacenter">
<img class="delete-icon" v-if="MyPopupState == 'collect'" @click.stop="cancelCollection(item['token'], index)" src="@/assets/img/delete-icon.svg" />
<img class="delete-icon" v-if="MyPopupState == 'collect'" @click.stop="cancelCollection(item['token'], index, item?.data?.uniqid)" src="@/assets/img/delete-icon.svg" />
<div class="anonymous-box flexacenter" v-else @click.stop="openAnonymousState(index)">
<div class="text">{{ item["anonymous"] == 1 ? "匿名" : "公开" }}</div>
<img class="arrow-icon" src="@/assets/img/arrow-gray.svg" />
@@ -215,9 +215,10 @@ const closeDialog = () => {
}
// const emit = defineEmits(["cutMy"]);
const unbookmarkSamePage = inject("unbookmarkSamePage")
// 处理取消收藏
const cancelCollection = (token, index) => {
const cancelCollection = (token, index, uniqid) => {
const id = route.params["id"]
MyUserDeleteCollectHttp({ token }).then(res => {
if (res.code != 200) {
ElMessage.error(res.message)
@@ -228,6 +229,8 @@ const cancelCollection = (token, index) => {
showList.value = [...collectList]
count.value.collect--
collectCount.value--
if (id == uniqid) unbookmarkSamePage()
})
}
</script>