Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 40d5b691
authored
Oct 25, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
5c7811e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
src/services/Menu.js
src/utils/common/common.js
src/services/Menu.js
View file @
40d5b69
...
@@ -28,7 +28,7 @@ export default class MenuService extends HTTP {
...
@@ -28,7 +28,7 @@ export default class MenuService extends HTTP {
});
});
}
}
getPermission
()
{
getPermission
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
axiosGet
({
this
.
axiosGet
({
url
:
API
.
PERMISSION_LIST
,
url
:
API
.
PERMISSION_LIST
,
...
...
src/utils/common/common.js
View file @
40d5b69
...
@@ -126,15 +126,18 @@ export const Common = {
...
@@ -126,15 +126,18 @@ export const Common = {
},
},
// 全局判断是否有权限(针对所有页面的权限按钮,为了兼容一个权限按钮控制多个页面) v1.25.0版本需求添加
// 全局判断是否有权限(针对所有页面的权限按钮,为了兼容一个权限按钮控制多个页面) v1.25.0版本需求添加
isPermission
:
async
function
(
pid
)
{
isPermission
(
pid
)
{
return
new
Promise
((
resolve
)
=>
{
const
menuService
=
new
MenuService
();
const
menuService
=
new
MenuService
();
let
res
=
await
menuService
.
getPermission
({
permissionTag
:
pid
});
menuService
.
getPermission
({
permissionTag
:
pid
}).
then
((
res
)
=>
{
let
_list
=
res
.
data
||
[];
let
_list
=
res
.
data
||
[];
if
(
_list
&&
_list
.
length
)
{
if
(
_list
&&
_list
.
length
)
{
return
true
;
resolve
(
true
)
;
}
else
{
}
else
{
return
false
;
resolve
(
false
)
;
}
}
});
});
},
},
// 隐藏菜单和header的路由
// 隐藏菜单和header的路由
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment