初步完成merchant和admin不同role的展示内容逻辑

This commit is contained in:
2026-03-12 10:18:04 +08:00
parent c90b549b89
commit f19dd093bf
13 changed files with 853 additions and 110 deletions

View File

@@ -62,6 +62,7 @@ import {
openRoute
} from '@/layouts/admin/store/adminNavStore.uts'
import { state, logout } from '@/utils/store.uts'
import { clearAdminRoleCache } from '@/layouts/admin/utils/role.uts'
const showUserMenu = ref(false)
const userName = computed((): string => state.userProfile.username || state.userProfile.email || 'admin')
@@ -116,7 +117,7 @@ function handleLogout(e: any) {
success: (res) => {
if (res.confirm) {
logout()
uni.removeStorageSync('adminRole')
clearAdminRoleCache()
uni.removeStorageSync('token')
// Force the layout cleanup to wait for the dialog to disappear
setTimeout(() => {