--demand 添加权限

This commit is contained in:
yuping
2023-02-01 20:19:45 +08:00
parent 5b8e8a691b
commit 2b00230efa
11 changed files with 78 additions and 71 deletions

View File

@@ -27,6 +27,15 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
return newArr;
}
const admin = [5, 6, 8, 9, 11, 12]
export function checkPer(per) {
if (!per) {
return false
}
return (per + "").split(',').some(t => admin.some(s => s == t))
}
export function deepClone(obj) {
let result = typeof obj.splice === "function" ? [] : {};
if (obj && typeof obj === "object") {