Commit 35a6ef4c by 孙亚楠

g

parent 1da378ad
......@@ -12,7 +12,7 @@ class UserCtl extends CtlBase {
this.redisClient = system.getObject("util.redisClient");
this.captchaSve = system.getObject("service.common.captchaSve");
this.deliverSve = system.getObject("service.common.deliverSve");
this.merchantCtl = system.getObject("service.saas.merchantSve");
this.merchantSve = system.getObject("service.saas.merchantSve");
}
async login(pobj, pobj2, req, res) {
......@@ -29,7 +29,7 @@ class UserCtl extends CtlBase {
loginUser = loginUser.data;
let channel = await this.merchantCtl.info({id:loginUser.saas_merchant_id});
let channel = await this.merchantSve.info({id:loginUser.saas_merchant_id});
if (channel.status != 0) {
return system.getResult(null, `渠道【${loginName}】不存在`);
}
......@@ -94,6 +94,15 @@ class UserCtl extends CtlBase {
}
async currentUser(qobj, pobj, req) {
let saas_merchant_id = req.loginUser.saas_merchant_id;
if(!saas_merchant_id){
return system.getResult(null, `登录失效,请重新登录`);
}
let _merchant = await this.merchantSve.info({id:saas_merchant_id});
if(_merchant.status!=0 ){
return system.getResult(null, `商户不存在`);
}
req.loginUser.saas_merchant_name = _merchant.data.name;
return system.getResultSuccess(req.loginUser);
}
......
......@@ -188,22 +188,22 @@ class System {
let dev = "http://39.107.234.14";
return {
// 公共服务
common: local + ":3102" + path,
common: dev + ":3102" + path,
// 商户服务
merchant: local + ":3101" + path,
merchant: dev + ":3101" + path,
// 订单服务
order: local + ":3103" + path,
order: dev + ":3103" + path,
// 发票服务
invoice: dev + ":3105" + path,
// 用户服务
uc: local + ":3106" + path,
uc: dev + ":3106" + path,
// 交易
trade: local + ":3107" + path,
trade: dev + ":3107" + path,
}
} else {
return {
......
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