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
ddb0b99d
Commit
ddb0b99d
authored
Apr 16, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
5ced773c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
center-manage/app/base/db/initData.js
+1
-0
center-manage/app/base/service/impl/auth/userSve.js
+3
-0
No files found.
center-manage/app/base/db/initData.js
View file @
ddb0b99d
...
@@ -17,6 +17,7 @@ db.sync({force:true}).then(async ()=>{
...
@@ -17,6 +17,7 @@ db.sync({force:true}).then(async ()=>{
});
});
let
Role
=
db
.
models
[
"role"
];
let
Role
=
db
.
models
[
"role"
];
await
Role
.
create
({
code
:
"ta"
,
name
:
"租户"
,
app_id
:
appnew
.
id
,
company_id
:
settings
.
pmcompanyid
})
await
Role
.
create
({
code
:
"ta"
,
name
:
"租户"
,
app_id
:
appnew
.
id
,
company_id
:
settings
.
pmcompanyid
})
await
Role
.
create
({
code
:
"pr"
,
name
:
"个人"
,
app_id
:
appnew
.
id
,
company_id
:
settings
.
pmcompanyid
})
const
us
=
await
system
.
getObject
(
"service.auth.userSve"
);
const
us
=
await
system
.
getObject
(
"service.auth.userSve"
);
let
usuper
=
await
us
.
pmregister
({
userName
:
"sm"
,
password
:
"951753"
,
isSuper
:
true
,
isAdmin
:
true
,
isEnabled
:
true
,
nickName
:
"superman"
,
app_id
:
appnew
.
id
,
company_id
:
settings
.
id
})
let
usuper
=
await
us
.
pmregister
({
userName
:
"sm"
,
password
:
"951753"
,
isSuper
:
true
,
isAdmin
:
true
,
isEnabled
:
true
,
nickName
:
"superman"
,
app_id
:
appnew
.
id
,
company_id
:
settings
.
id
})
...
...
center-manage/app/base/service/impl/auth/userSve.js
View file @
ddb0b99d
...
@@ -12,6 +12,9 @@ class UserService extends ServiceBase {
...
@@ -12,6 +12,9 @@ class UserService extends ServiceBase {
//平台注册,默认角色,不具备平台级别的管理或运营功能
//平台注册,默认角色,不具备平台级别的管理或运营功能
//注册接口
//注册接口
//封装kongurl
//封装kongurl
//前端需要选择用户类型,如果企业用户,那么就设置角色为租户
//如果是个人类型,那么就设置角色为普通
async
pmregister
(
p
,
q
){
async
pmregister
(
p
,
q
){
var
self
=
this
;
var
self
=
this
;
let
tmppwd
=
p
.
password
;
let
tmppwd
=
p
.
password
;
...
...
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