Commit 4fb57cac by 王昆

gsb

parent d98ec680
...@@ -11,6 +11,7 @@ class UserCtl extends CtlBase { ...@@ -11,6 +11,7 @@ class UserCtl extends CtlBase {
this.userSve = system.getObject("service.uc.userSve"); this.userSve = system.getObject("service.uc.userSve");
this.redisClient = system.getObject("util.redisClient"); this.redisClient = system.getObject("util.redisClient");
this.captchaSve = system.getObject("service.common.captchaSve"); this.captchaSve = system.getObject("service.common.captchaSve");
this.deliverSve = system.getObject("service.common.deliverSve");
} }
async login(pobj, pobj2, req, res) { async login(pobj, pobj2, req, res) {
...@@ -28,7 +29,7 @@ class UserCtl extends CtlBase { ...@@ -28,7 +29,7 @@ class UserCtl extends CtlBase {
// return vrs; // return vrs;
// } // }
var loginUser = await this.userSve.login({ var loginUser = await this.deliverSve.login({
ucname: loginName, ucname: loginName,
password: password, password: password,
}); });
...@@ -37,10 +38,6 @@ class UserCtl extends CtlBase { ...@@ -37,10 +38,6 @@ class UserCtl extends CtlBase {
} }
loginUser = loginUser.data; loginUser = loginUser.data;
if(loginUser.uctype != 3) {
return system.getResult(null, "用户名或密码错误" + error.message);
}
var xggadminsid = await this.setLogin(loginUser); var xggadminsid = await this.setLogin(loginUser);
let rs = { let rs = {
key: xggadminsid, key: xggadminsid,
...@@ -77,7 +74,7 @@ class UserCtl extends CtlBase { ...@@ -77,7 +74,7 @@ class UserCtl extends CtlBase {
if (!loginUser) { if (!loginUser) {
return []; return [];
} }
if (loginUser.isMain) { if (loginUser.isAdmin) {
return [ return [
{ {
"name": "数据概览", "name": "数据概览",
......
...@@ -7,6 +7,11 @@ class DeliverService extends ServiceBase { ...@@ -7,6 +7,11 @@ class DeliverService extends ServiceBase {
super(); super();
} }
async login(params) {
var rs = await this.callms("common", "deliverLogin", params);
return rs;
}
async all(params) { async all(params) {
var rs = await this.callms("common", "deliverAll", {}); var rs = await this.callms("common", "deliverAll", {});
await this.doPercent(rs.data); await this.doPercent(rs.data);
......
...@@ -173,8 +173,8 @@ class System { ...@@ -173,8 +173,8 @@ class System {
// var domain = "http://127.0.0.1"; // var domain = "http://127.0.0.1";
return { return {
// 公共服务 // 公共服务
common: domain + ":3102" + path, // common: domain + ":3102" + path,
// common: "http://127.0.0.1:3102" + path, common: "http://127.0.0.1:3102" + path,
// 商户服务 // 商户服务
merchant: domain + ":3101" + path, merchant: domain + ":3101" + path,
......
...@@ -42,11 +42,6 @@ module.exports = function (app) { ...@@ -42,11 +42,6 @@ module.exports = function (app) {
} }
req.loginUser = jsonUser; req.loginUser = jsonUser;
if(req.loginUser.uctype != 3) {
res.end(JSON.stringify({ status: -99, msg: "no deliver user, kick off" }));
return;
}
req.loginUser = jsonUser;
next(); next();
}); });
...@@ -71,8 +66,8 @@ module.exports = function (app) { ...@@ -71,8 +66,8 @@ module.exports = function (app) {
if(req.loginUser) { if(req.loginUser) {
req.query = req.query || {}; req.query = req.query || {};
req.query.saas_id = req.loginUser.saas_id; req.query.saas_id = req.loginUser.saas_id;
req.query.deliverId = req.loginUser.uctypeId || ""; req.query.deliverId = req.loginUser.deliver_id || "";
req.query.deliver_id = req.loginUser.uctypeId || ""; req.query.deliver_id = req.loginUser.deliver_id || "";
} }
params.push(methodName); params.push(methodName);
params.push(req.body); params.push(req.body);
...@@ -104,8 +99,8 @@ module.exports = function (app) { ...@@ -104,8 +99,8 @@ module.exports = function (app) {
if(req.loginUser) { if(req.loginUser) {
req.body.saas_id = req.loginUser.saas_id; req.body.saas_id = req.loginUser.saas_id;
req.body.deliverId = req.loginUser.uctypeId || ""; req.body.deliverId = req.loginUser.deliver_id || "";
req.body.deliver_id = req.loginUser.uctypeId || ""; req.body.deliver_id = req.loginUser.deliver_id || "";
} }
params.push(methodName); params.push(methodName);
......
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