Commit 70b5de56 by 蒋勇

d

parent 6c4597bc
...@@ -183,6 +183,7 @@ class UserCtl extends CtlBase { ...@@ -183,6 +183,7 @@ class UserCtl extends CtlBase {
async loginByMobile(pobj, obj, req) { async loginByMobile(pobj, obj, req) {
const cid = req.companyid; const cid = req.companyid;
obj.u.cid = cid; obj.u.cid = cid;
var company = await this.companyS.findById(req.companyid);
var existedUser = await this.service.getUserByMobile(obj.u); var existedUser = await this.service.getUserByMobile(obj.u);
if (existedUser != null) { if (existedUser != null) {
req.session.user = existedUser; req.session.user = existedUser;
...@@ -192,7 +193,8 @@ class UserCtl extends CtlBase { ...@@ -192,7 +193,8 @@ class UserCtl extends CtlBase {
mobile: obj.u.mobile, mobile: obj.u.mobile,
userName: obj.u.mobile, userName: obj.u.mobile,
nickName: obj.u.mobile, nickName: obj.u.mobile,
company_id: obj.u.cid company_id: obj.u.cid,
themename:company.siteTheme
}; };
var result = await this.service.create(params); var result = await this.service.create(params);
req.session.user = result; req.session.user = result;
......
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