初步完成merchant和admin不同role的展示内容逻辑3
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="page" :style="cssVars">
|
||||
<!-- Header:仅保留左侧Logo -->
|
||||
<view class="header">
|
||||
@@ -339,7 +339,7 @@ const handleLogin = async () => {
|
||||
class_id: ''
|
||||
} as UserProfile
|
||||
setUserProfile(adminProfile)
|
||||
uni.setStorageSync('merchant_id', 'admin') // mock
|
||||
// uni.setStorageSync('merchant_id', 'admin') // mock removed
|
||||
|
||||
uni.showToast({ title: '管理员登录成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
@@ -422,14 +422,8 @@ const handleLogin = async () => {
|
||||
console.error('获取用户信息失败(忽略):', e)
|
||||
}
|
||||
|
||||
// 显式保存用户ID到本地存储
|
||||
// 已移除对 shared storage user_id 的依赖
|
||||
const currentSession = supa.getSession()
|
||||
if (currentSession.user != null) {
|
||||
const uid = currentSession.user?.getString('id')
|
||||
if (uid != null) {
|
||||
uni.setStorageSync('user_id', uid)
|
||||
}
|
||||
}
|
||||
|
||||
uni.showToast({ title: '登录成功', icon: 'success' })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user