Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
303c8d70
Commit
303c8d70
authored
May 26, 2021
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加角色 资质宝分配员
parent
54a41a47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
center-manage/app/config/routes/api.js
+8
-2
No files found.
center-manage/app/config/routes/api.js
View file @
303c8d70
...
...
@@ -30,7 +30,7 @@ module.exports = function (app) {
let
openid
=
sourceUser
.
employee
;
let
userName
=
openid
;
let
nickName
=
sourceUser
.
name
;
let
fixedcodes
=
[
"资质宝交付员"
,
'资质宝业务员'
,
"工商业务员"
,
"工商交付员"
];
let
fixedcodes
=
[
"资质宝交付员"
,
'资质宝业务员'
,
"工商业务员"
,
"工商交付员"
,
"资质宝分配员"
];
let
rolecodes
=
sourceUser
.
roles
?
sourceUser
.
roles
:
[];
let
rcs
=
rolecodes
.
filter
(
rc
=>
{
if
(
fixedcodes
.
indexOf
(
rc
)
>=
0
)
{
...
...
@@ -75,6 +75,9 @@ module.exports = function (app) {
opath
=
"root10/bizgroup01/g1members/"
+
userName
;
skilltags
.
add
(
"公司注册"
);
}
if
(
rcs
.
includes
(
"资质宝分配员"
))
{
opath
=
"root10/"
+
userName
;
}
//调用pmregister
let
reguser
=
{
company_id
:
company
.
id
,
...
...
@@ -114,7 +117,7 @@ module.exports = function (app) {
let
openid
=
sourceUser
.
employee
;
let
userName
=
openid
;
let
nickName
=
sourceUser
.
name
;
let
fixedcodes
=
[
"资质宝交付员"
,
'资质宝业务员'
,
"工商业务员"
,
"工商交付员"
];
let
fixedcodes
=
[
"资质宝交付员"
,
'资质宝业务员'
,
"工商业务员"
,
"工商交付员"
,
"资质宝分配员"
];
let
rolecodes
=
sourceUser
.
roles
?
sourceUser
.
roles
:
[];
let
rcs
=
rolecodes
.
filter
(
rc
=>
{
if
(
fixedcodes
.
indexOf
(
rc
)
>=
0
)
{
...
...
@@ -159,6 +162,9 @@ module.exports = function (app) {
opath
=
"root10/bizgroup01/g1members/"
+
userName
;
skilltags
.
add
(
"公司注册"
);
}
if
(
rcs
.
includes
(
"资质宝分配员"
))
{
opath
=
"root10/"
+
userName
;
}
//调用pmregister
let
reguser
=
{
company_id
:
company
.
id
,
...
...
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