接入登录页面

This commit is contained in:
2026-02-26 17:49:19 +08:00
parent 1f14ef32ef
commit d53551feba
3 changed files with 14 additions and 13 deletions

View File

@@ -142,7 +142,8 @@
import { ref, onMounted } from 'vue'
import supa from '@/components/supadb/aksupainstance.uts'
import { IS_TEST_MODE } from '@/ak/config.uts'
import { getCurrentUser, logout } from '@/utils/store.uts'
import { getCurrentUser, logout, setIsLoggedIn, setUserProfile } from '@/utils/store.uts'
import type { UserProfile } from '@/pages/user/types.uts'
const cssVars = {
'--bg': '#f5f6f8',
@@ -182,7 +183,7 @@ onMounted(() => {
if (redirect != null && redirect.length > 0) {
uni.redirectTo({ url: decodeURIComponent(redirect) })
} else {
uni.switchTab({ url: '/pages/mall/consumer/index' })
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
}
}
} catch (e) {
@@ -279,7 +280,7 @@ const handleLogin = async () => {
uni.showToast({ title: '管理员登录成功', icon: 'success' })
setTimeout(() => {
uni.switchTab({ url: '/pages/mall/consumer/index' })
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
}, 500)
return
}
@@ -356,7 +357,7 @@ const handleLogin = async () => {
if (redirect != null && redirect.length > 0) {
uni.redirectTo({ url: decodeURIComponent(redirect) })
} else {
uni.switchTab({ url: '/pages/mall/consumer/index' })
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
}
}, 500)
}