完善收藏

This commit is contained in:
wangxiaowei
2025-10-30 14:00:58 +08:00
parent 0abb527276
commit 3465804793
6 changed files with 143 additions and 133 deletions

View File

@ -182,7 +182,7 @@
import { toast } from '@/utils/toast'
import { useUserStore } from '@/store'
import { getUrlCode, snsapiBaseAuthorize } from '@/hooks/useWeiXin'
import { router, NAVIGATE_TO } from '@/utils/tools'
import { getUserInfo } from '@/api/user'
const OSS = inject('OSS')
const navbarHeight = inject('navbarHeight')
@ -219,6 +219,10 @@
if (userStore.userInfo.mobile) {
userInfo.value = userStore.userInfo
isLogin.value = true
const user = getUserInfo()
console.log("🚀 ~ user:", user)
} else if (code && !userStore.userInfo.token) {
// 这里是微信授权之后跳转回到本页面获取到code但是没有登录状态的话需要进行登录操作
snsapiBaseAuthorize()