Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-boss
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-boss
Commits
e5343644
Commit
e5343644
authored
Dec 31, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
秀噶权限控制
parent
448a2cb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
homeAndReport.js
miniprogram/pages/homeAndReport/homeAndReport.js
+4
-2
homeAndReport.ts
miniprogram/pages/homeAndReport/homeAndReport.ts
+3
-0
No files found.
miniprogram/pages/homeAndReport/homeAndReport.js
View file @
e5343644
...
...
@@ -23,6 +23,8 @@ Page({
var
list
=
userRoles
.
map
(
function
(
item
)
{
return
tabList
.
find
(
function
(
menu
)
{
return
menu
.
code
===
item
.
menuCode
;
});
})
.
filter
(
function
(
menu
)
{
return
(
menu
?
true
:
false
);
});
if
(
!
list
.
find
(
function
(
item
)
{
return
item
.
code
===
'9002'
;
}))
list
.
push
(
tabList
[
tabList
.
length
-
1
]);
this
.
setData
({
selected
:
list
.
length
?
list
[
0
].
code
:
''
,
list
:
list
,
...
...
@@ -45,4 +47,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZUFuZFJlcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWVBbmRSZXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSxJQUFNLEdBQUcsR0FBR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1hcChpdGVtID0+IHRhYkxpc3QuZmluZChtZW51ID0+IG1lbnUuY29kZSA9PT0gaXRlbS5tZW51Q29kZSkpXG4gICAgICAuZmlsdGVyKG1lbnUgPT4gKG1lbnUgPyB0cnVlIDogZmFsc2UpKTtcbiAgICBpZiAoIWxpc3QuZmluZChpdGVtID0+IGl0ZW0uY29kZSA9PT0gJzkwMDInKSlcbiAgICAgIGxpc3QucHVzaCh0YWJMaXN0W3RhYkxpc3QubGVuZ3RoIC0gMV0pO1xuXG4gICAgdGhpcy5zZXREYXRhISh7XG4gICAgICBzZWxlY3RlZDogbGlzdC5sZW5ndGggPyBsaXN0WzBdLmNvZGUgOiAnJyxcbiAgICAgIGxpc3QsXG4gICAgfSk7XG4gIH0sXG4gIG9uU2hvdygpIHtcbiAgICBpZiAod3guaGlkZUhvbWVCdXR0b24pIHtcbiAgICAgIHd4LmhpZGVIb21lQnV0dG9uKCk7XG4gICAgfVxuICB9LFxuICBkYXRhOiB7XG4gICAgc2VsZWN0ZWQ6ICcnLFxuICAgIGxpc3Q6IFtdLFxuICB9LFxuICBjbGlja0hhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coJ2luIGNsaWNrJywgZSk7XG4gICAgbGV0IHsgcGF0aCwgaW5kZXggfSA9IGUuZGV0YWlsO1xuICAgIC8vIGNvbnNvbGUubG9nKHBhdGgsIGluZGV4KTtcbiAgICAvLyB3eC5zd2l0Y2hUYWIoeyB1cmw6IHBhdGggfSk7XG4gICAgdGhpcy5zZXREYXRhISh7XG4gICAgICBzZWxlY3RlZDogaW5kZXgsXG4gICAgfSk7XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
miniprogram/pages/homeAndReport/homeAndReport.ts
View file @
e5343644
...
...
@@ -31,6 +31,9 @@ Page({
let
list
=
userRoles
.
map
(
item
=>
tabList
.
find
(
menu
=>
menu
.
code
===
item
.
menuCode
))
.
filter
(
menu
=>
(
menu
?
true
:
false
));
if
(
!
list
.
find
(
item
=>
item
.
code
===
'9002'
))
list
.
push
(
tabList
[
tabList
.
length
-
1
]);
this
.
setData
!
({
selected
:
list
.
length
?
list
[
0
].
code
:
''
,
list
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment