首页卡片开发
This commit is contained in:
@@ -64,7 +64,7 @@ const useUserStore = defineStore("user", () => {
|
||||
});
|
||||
}
|
||||
|
||||
const logOut = (redirect = true) => {
|
||||
const logOut = (showLoginModal = true) => {
|
||||
hasLogin.value = false;
|
||||
token.value = ''
|
||||
resume.value = {}
|
||||
@@ -73,11 +73,10 @@ const useUserStore = defineStore("user", () => {
|
||||
uni.removeStorageSync('userInfo')
|
||||
uni.removeStorageSync('token')
|
||||
|
||||
// 只有在明确需要跳转时才跳转到登录页
|
||||
if (redirect) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
});
|
||||
// 如果需要显示登录弹窗,则通过事件通知页面显示微信登录弹窗
|
||||
if (showLoginModal) {
|
||||
// 通过 uni.$emit 发送全局事件,通知页面显示登录弹窗
|
||||
uni.$emit('showLoginModal');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user