完善登录逻辑和个人资料完善
This commit is contained in:
@@ -237,7 +237,7 @@ onLoad((opts) => {
|
||||
uni.setNavigationBarTitle({ title: '服务人员登录' })
|
||||
} else {
|
||||
loginMode.value = 'consumer'
|
||||
uni.setNavigationBarTitle({ title: '用户登录' })
|
||||
uni.setNavigationBarTitle({ title: '登录' })
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -499,6 +499,7 @@ const handleLogin = async () => {
|
||||
clearDeliveryAuth()
|
||||
throw new Error(authResult.message != '' ? authResult.message : '服务人员登录失败')
|
||||
}
|
||||
uni.$emit('authChanged', { loggedIn: true })
|
||||
uni.showToast({ title: '登录成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
const redirect = redirectPath.value
|
||||
@@ -543,6 +544,7 @@ const handleLogin = async () => {
|
||||
setUserProfile(adminProfile)
|
||||
// uni.setStorageSync('merchant_id', 'admin') // mock removed
|
||||
|
||||
uni.$emit('authChanged', { loggedIn: true })
|
||||
uni.showToast({ title: '管理员登录成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
goTargetHome()
|
||||
@@ -649,6 +651,7 @@ const handleLogin = async () => {
|
||||
// 已移除对 shared storage user_id 的依赖
|
||||
const currentSession = supa.getSession()
|
||||
|
||||
uni.$emit('authChanged', { loggedIn: true })
|
||||
uni.showToast({ title: '登录成功', icon: 'success' })
|
||||
|
||||
// 获取并上报推送 CID(若可用)
|
||||
|
||||
Reference in New Issue
Block a user