功能:更新消息中心和 YumiNail 模块
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { loadCachedAdminUserInfo, isBootstrapAdminUser, type AdminCachedUserInfo } from '@/utils/admin-session'
|
||||
|
||||
export { loadCachedAdminUserInfo, isBootstrapAdminUser }
|
||||
export type { AdminCachedUserInfo }
|
||||
|
||||
export const getAdminRoleLabel = (type?: number) => {
|
||||
switch (type) {
|
||||
case 4:
|
||||
return '平台管理员'
|
||||
case 2:
|
||||
return '店长'
|
||||
case 3:
|
||||
return '美甲师'
|
||||
default:
|
||||
return '后台账号'
|
||||
}
|
||||
}
|
||||
|
||||
export const getAdminShopOptions = (userInfo?: AdminCachedUserInfo | null) => {
|
||||
const ids = userInfo?.shopIds || []
|
||||
const names = userInfo?.shopNames || []
|
||||
return ids.map((id, index) => ({
|
||||
id: String(id),
|
||||
name: names[index] || `门店 ${id}`
|
||||
}))
|
||||
}
|
||||
|
||||
export const getAdminCurrentShopName = (userInfo?: AdminCachedUserInfo | null) =>
|
||||
userInfo?.shopName || '游客模式'
|
||||
Reference in New Issue
Block a user