增加版本管理页面,修改店铺添加地图组件使用

This commit is contained in:
2025-02-14 09:17:34 +08:00
parent 0e3759b34d
commit dda2f32ccc
36 changed files with 2486 additions and 318 deletions

View File

@@ -74,15 +74,16 @@ function redirectToLogin(to: RouteLocationNormalized, next: NavigationGuardNext)
/** 判断是否有权限 */
export function hasAuth(value: string | string[], type: "button" | "role" = "button") {
const { roles, perms } = useUserStore().userInfo;
const { roles } = useUserStore().userInfo;
const perms = useUserStore().promissionList;
// 超级管理员 拥有所有权限
if (type === "button" && roles.includes("ROOT")) {
return true;
}
// if (type === "button" && roles.includes("ROOT")) {
// return true;
// }
return true;
const auths = type === "button" ? perms : roles;
return typeof value === "string"
? auths.includes(value)
: value.some((perm) => auths.includes(perm));
// const auths = type === "button" ? perms : roles;
// return typeof value === "string"
// ? auths.includes(value)
// : value.some((perm) => auths.includes(perm));
}