Commit 4fb57cac by 王昆

gsb

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