feat: 产品菜单路由权限

This commit is contained in:
rd
2025-07-08 16:55:04 +08:00
parent ead209da4d
commit f87e5ff020
26 changed files with 263 additions and 102 deletions

47
src/utils/stroage.ts Normal file
View File

@ -0,0 +1,47 @@
export const glsWithCatch = (key: string) => {
try {
return localStorage?.getItem(key);
} catch (error) {
console.log(error);
}
};
export const slsWithCatch = (key: string, value: any) => {
try {
localStorage?.setItem(key, value);
} catch (error) {
console.log(error);
}
};
export const rlsWithCatch = (key: string) => {
try {
localStorage?.removeItem(key);
} catch (error) {
console.log(error);
}
};
export const gssWithCatch = (key: string) => {
try {
return sessionStorage?.getItem(key);
} catch (error) {
console.log(error);
}
};
export const sssWithCatch = (key: string, value: any) => {
try {
sessionStorage?.setItem(key, value);
} catch (error) {
console.log(error);
}
};
export const rssWithCatch = (key: string) => {
try {
sessionStorage?.removeItem(key);
} catch (error) {
console.log(error);
}
};