Skip to content

Commit

Permalink
[D] 无用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zxysilent committed Apr 15, 2021
1 parent f7786a0 commit fcf76f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
27 changes: 0 additions & 27 deletions vue/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,4 @@ utils.getAuth = () => {
location.href = "/login";
}
};
utils.Role = {
RSup: 30, //超级管理员
RAtv: 20, //启用/禁用
RBas: 10, //基本权限
//判断指定位置权限
getRole: (rl, r) => {
if ((rl & (1 << r)) >> r == 1) {
return true;
}
return false;
}
};
utils.Role.isSup = rl => {
return utils.Role.getRole(rl, utils.Role.RSup);
};
utils.Role.isAtv = rl => {
return utils.Role.getRole(rl, utils.Role.RAtv);
};
// 权限路由相关
utils.Role.allow = (role, arr) => {
for (let i = 0; i < arr.length; i++) {
if (utils.Role.getRole(role, arr[i])) {
return true;
}
}
return false;
};
export default utils;
1 change: 0 additions & 1 deletion vue/src/views/user/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
</div>
</template>
<script>
import Utils from "@/utils";
import { admUserGet, admUserEdit } from "@/api/user";
export default {
data() {
Expand Down

0 comments on commit fcf76f2

Please sign in to comment.