no message
This commit is contained in:
@@ -128,8 +128,16 @@ const getPublish = () => {
|
||||
.finally(() => (publisloading.value = false))
|
||||
}
|
||||
|
||||
// 切换
|
||||
const cutMy = key => {
|
||||
// 切换 isEmpty 是否清空收藏数据, 因为不确定用户是否有新收藏
|
||||
const cutMy = (key, isEmpty) => {
|
||||
if (isEmpty) {
|
||||
collectList = []
|
||||
collectPage = 1
|
||||
collectCount.value = 0
|
||||
}
|
||||
|
||||
console.log("key", key, "collectList", collectList)
|
||||
console.log(key == "collect" && collectList.length == 0)
|
||||
if (key == "collect" && collectList.length == 0) getCollect()
|
||||
else if (key == "mj" && publishList.length == 0) getPublish()
|
||||
|
||||
@@ -191,7 +199,7 @@ const goDetails = uniqid => {
|
||||
}
|
||||
|
||||
// router.replace(`/details/${uniqid}`)
|
||||
goToURL(`/details/${uniqid}`)
|
||||
goToURL(`/details/${uniqid}`, false)
|
||||
show.value = false
|
||||
MyPopupState.value = ""
|
||||
}
|
||||
|
||||
@@ -129,11 +129,10 @@ const handleUser = async key => {
|
||||
return
|
||||
}
|
||||
|
||||
console.log(Object.keys(count.value).length, "length")
|
||||
|
||||
if (Object.keys(count.value).length === 0) await getUser()
|
||||
|
||||
MyPopupRef.value.cutMy(key)
|
||||
if (Object.keys(count.value).length === 0) {
|
||||
await getUser()
|
||||
MyPopupRef.value.cutMy(key, true)
|
||||
} else MyPopupRef.value.cutMy(key)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user