no message

This commit is contained in:
A1300399510
2024-01-18 17:25:40 +08:00
parent e01ac5326b
commit 7390c2fc72
11 changed files with 273 additions and 67 deletions

View File

@@ -85,6 +85,7 @@ let islike = inject("islike")
let iscollection = inject("iscollection")
let qrcode = inject("qrcode")
let token = inject("token")
const topHeadRef = inject("topHeadRef")
// 获取完整 url
const getFullUrl = () => {
@@ -127,7 +128,7 @@ const handleCollect = () => {
return
}
// topHeadRef.value.count = {}
topHeadRef.value.count = {}
operateCollectHttp({ token: token.value }).then(res => {
if (res.code != 200) {
@@ -149,6 +150,16 @@ const isBrowser = computed(() => {
// 点赞
const handleLike = () => {
if (isNeedLogin.value) {
goLogin()
return
}
if (islike.value) {
ElMessage.error("不可取消点赞")
return
}
operateLikeHttp({ token: token.value }).then(res => {
if (res.code != 200) {
ElMessage.error(res.message)