no message
This commit is contained in:
@@ -67,6 +67,7 @@ let props = defineProps({
|
||||
|
||||
let show = ref(false)
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
let MyPopupState = ref("") // collect mj
|
||||
|
||||
@@ -152,18 +153,14 @@ const closeAllAnonymousState = () => {
|
||||
}
|
||||
// 修改匿名状态
|
||||
const handleAnonymousState = (token, index, anonymous) => {
|
||||
console.log("token", token, index)
|
||||
changeAnonymousHttp({ token, anonymous }).then(res => {
|
||||
console.log("res", res)
|
||||
if (res.code != 200) return
|
||||
|
||||
publishList[index]["anonymous"] = anonymous
|
||||
showList.value = [...publishList]
|
||||
closeAllAnonymousState()
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
})
|
||||
|
||||
ElMessage.success(res.message)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -176,9 +173,20 @@ const handleListScroll = e => {
|
||||
if (MyPopupState.value == "mj") getPublish()
|
||||
}
|
||||
|
||||
let clearAllData = inject("clearAllData")
|
||||
let getDetails = inject("getDetails")
|
||||
|
||||
// 打开详情页
|
||||
const goDetails = uniqid => {
|
||||
router.push(`/details/${uniqid}`)
|
||||
let path = route["path"] || ""
|
||||
if (path.indexOf("/details/") != -1) {
|
||||
clearAllData()
|
||||
nextTick(() => getDetails())
|
||||
}
|
||||
|
||||
router.replace(`/details/${uniqid}`)
|
||||
show.value = false
|
||||
MyPopupState.value = ""
|
||||
}
|
||||
|
||||
//暴露state和play方法
|
||||
@@ -191,7 +199,6 @@ defineExpose({
|
||||
// 处理取消收藏
|
||||
const cancelCollection = (token, index) => {
|
||||
MyUserDeleteCollectHttp({ token }).then(res => {
|
||||
console.log("res", res)
|
||||
if (res.code != 200) {
|
||||
ElMessage.error(res.message)
|
||||
return
|
||||
@@ -200,7 +207,6 @@ const cancelCollection = (token, index) => {
|
||||
collectList.splice(index, 1)
|
||||
collectCount.value--
|
||||
|
||||
console.log(collectList, "collectList")
|
||||
showList.value = [...collectList]
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user