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
fd585091
Commit
fd585091
authored
Dec 04, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
a74c5230
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
+40
-2
igirl-web/app/base/controller/impl/userCtl.js
+2
-1
igirl-web/app/base/db/metadata/apps/platform.js
+2
-0
igirl-web/app/base/db/metadata/subsys/policycenter.js
+32
-0
igirl-web/app/base/service/impl/userSve.js
+4
-1
No files found.
igirl-web/app/base/controller/impl/userCtl.js
View file @
fd585091
...
...
@@ -175,7 +175,8 @@ class UserCtl extends CtlBase {
pobj
.
u
.
password
=
super
.
encryptPasswd
(
pobj
.
u
.
password
);
const
cid
=
req
.
companyid
;
pobj
.
u
.
company_id
=
cid
;
var
u
=
await
this
.
service
.
register
(
pobj
.
u
);
var
company
=
await
this
.
companyS
.
findById
(
cid
);
var
u
=
await
this
.
service
.
register
(
pobj
.
u
,
company
.
siteTheme
);
//req.session.user=u;
return
system
.
getResult2
(
u
);
}
...
...
igirl-web/app/base/db/metadata/apps/platform.js
View file @
fd585091
const
pmgnode
=
require
(
"../subsys/pmg"
);
const
entcenternode
=
require
(
"../subsys/entcenter"
);
const
policycenter
=
require
(
"../subsys/policycenter"
);
const
personcenternode
=
require
(
"../subsys/personcenter"
);
module
.
exports
=
{
"appid"
:
"wx76a324c5d201d1a4"
,
...
...
@@ -22,6 +23,7 @@ module.exports = {
},
pmgnode
,
entcenternode
,
policycenter
,
personcenternode
,
{
"code"
:
"toolCenter"
,
...
...
igirl-web/app/base/db/metadata/subsys/policycenter.js
0 → 100644
View file @
fd585091
module
.
exports
=
{
"code"
:
"policycenter"
,
"isleft"
:
true
,
"label"
:
"政策中心"
,
"icon"
:
"el-icon-menu"
,
"isSubmenu"
:
true
,
"children"
:
[
{
"code"
:
"bizmag"
,
"isGroup"
:
true
,
"icon"
:
"fa fa-outdent"
,
"label"
:
"政策工具"
,
"children"
:
[
{
"code"
:
"tool1"
,
"label"
:
"工具1"
,
"isMenu"
:
true
,
"bizCode"
:
"tool1"
,
"bizConfig"
:
null
,
"path"
:
""
},
{
"code"
:
"tool2"
,
"label"
:
"工具2"
,
"isMenu"
:
true
,
"bizCode"
:
"tool2"
,
"bizConfig"
:
null
,
"path"
:
""
},
]
}
//------------------------------------------------企业中心左边菜单配置-------------------------------结束
],
};
\ No newline at end of file
igirl-web/app/base/service/impl/userSve.js
View file @
fd585091
...
...
@@ -95,13 +95,16 @@ class UserService extends ServiceBase {
return
this
.
dao
.
getAuths
(
userid
);
}
async
register
(
userinfo
)
{
async
register
(
userinfo
,
theme
)
{
var
self
=
this
;
return
this
.
db
.
transaction
(
function
(
t
)
{
return
self
.
dao
.
create
(
userinfo
,
t
).
then
(
async
function
(
user
)
{
//按照code查询出角色,设置默认访客角色
if
(
user
.
company_id
!=
1
){
var
role
=
await
self
.
roleDao
.
model
.
findOne
({
where
:
{
code
:
"guest"
},
transaction
:
t
});
if
(
theme
&&
theme
==
"policy"
){
role
=
await
self
.
roleDao
.
model
.
findOne
({
where
:
{
code
:
"policy"
},
transaction
:
t
});
}
console
.
log
(
role
);
await
user
.
setRoles
([
role
],
{
transaction
:
t
});
}
...
...
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