Commit a04abffc by 王昆

gsb

parent ee2abfb2
...@@ -33,7 +33,7 @@ class UserCtl extends CtlBase { ...@@ -33,7 +33,7 @@ class UserCtl extends CtlBase {
ucname: loginName, ucname: loginName,
password: password, password: password,
}); });
if(loginUser.status != 0) { if (loginUser.status != 0) {
return loginUser; return loginUser;
} }
...@@ -61,8 +61,8 @@ class UserCtl extends CtlBase { ...@@ -61,8 +61,8 @@ class UserCtl extends CtlBase {
async getMenu(qobj, pobj, req) { async getMenu(qobj, pobj, req) {
// return system.getResultSuccess(req.loginUser.menus); // return system.getResultSuccess(req.loginUser.menus);
let loginUser = req.loginUser; let loginUser = req.loginUser;
if(!loginUser) { if (!loginUser) {
return system.getResultSuccess({gtArr : [], pjArr: []}) return system.getResultSuccess({gtArr: [], pjArr: []})
} }
let gtArr = this.getOrderMenu(loginUser); let gtArr = this.getOrderMenu(loginUser);
...@@ -151,14 +151,12 @@ class UserCtl extends CtlBase { ...@@ -151,14 +151,12 @@ class UserCtl extends CtlBase {
} }
]; ];
} }
} }
getInvoiceMenu(loginUser) { getInvoiceMenu(loginUser) {
if (!loginUser) { if (!loginUser) {
return []; return [];
} }
if (loginUser.isMain) {
return [ return [
{ {
name: "数据概览", name: "数据概览",
...@@ -169,36 +167,11 @@ class UserCtl extends CtlBase { ...@@ -169,36 +167,11 @@ class UserCtl extends CtlBase {
name: "发票管理", name: "发票管理",
icon: "iconfont icon-gth-gsfapiaozhongxin", icon: "iconfont icon-gth-gsfapiaozhongxin",
team: [ team: [
{name: "发票申请", path: "/trading/invoiceTransact"}, {name: "发票办理", path: "/trading/invoiceTransact"},
{name: "发票管理", path: "/trading/invoiceManagement"}, {name: "发票管理", path: "/trading/invoiceManagement"},
{name: "红冲申请", path: "/trading/invoiceApplyFor"}
] ]
},
{
name: "用户中心",
icon: "iconfont icon-gth-gsgetihuzhongxin",
team: [{name: "用户管理", path: "/user/userCentertwo"}]
} }
]; ];
} else {
return [
{
name: "数据概览",
icon: "iconfont icon-gth-gsshujugailan",
team: [{name: "业务数据汇总", path: "/information"}]
},
{
name: "发票管理",
icon: "iconfont icon-gth-gsfapiaozhongxin",
team: [
{name: "发票申请", path: "/trading/invoiceTransact"},
{name: "发票管理", path: "/trading/invoiceManagement"},
{name: "红冲申请", path: "/trading/invoiceApplyFor"}
]
}
];
}
} }
/** /**
...@@ -320,9 +293,10 @@ class UserCtl extends CtlBase { ...@@ -320,9 +293,10 @@ class UserCtl extends CtlBase {
return system.getResult(null, `系统错误 错误信息 ${error}`); return system.getResult(null, `系统错误 错误信息 ${error}`);
} }
} }
async updPassword(params, pobj2, req) { async updPassword(params, pobj2, req) {
params.password = this.trim(params.password); params.password = this.trim(params.password);
if(!params.password) { if (!params.password) {
return system.getResult(null, `请填写密码`); return system.getResult(null, `请填写密码`);
} }
...@@ -359,4 +333,5 @@ class UserCtl extends CtlBase { ...@@ -359,4 +333,5 @@ class UserCtl extends CtlBase {
} }
} }
} }
module.exports = UserCtl; module.exports = UserCtl;
\ No newline at end of file
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