Commit ddb0b99d by 蒋勇

d

parent 5ced773c
...@@ -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})
......
...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment