Commit feb3802f by 王昆

gsb

parent ef12f280
......@@ -46,37 +46,6 @@ class UserCtl extends CtlBase {
return loginsid;
}
getMenu(loginUser) {
if (!loginUser) {
return [];
}
return [{
"name": "数据概览",
"icon": "iconfont icon-gth-gsshujugailan",
"team": [{
"name": "业务数据汇总",
"path": "/home"
}]
},
{
"name": "订单中心",
"icon": "iconfont icon-gth-gsdingdanzhongxin",
"team": [{
"name": "订单管理",
"path": "/trading/ordersAll"
}, ]
},
{
"name": "个体户中心",
"icon": "iconfont icon-gth-gsgetihuzhongxin",
"team": [{
"name": "个体户管理",
"path": "/trading/userInformation"
}, ]
},
];
}
async currentUser(qobj, pobj, req) {
return system.getResultSuccess(this.loginDTO(req.loginUser));
}
......@@ -105,9 +74,22 @@ class UserCtl extends CtlBase {
}
}
async delUser(params, pobj2, req) {
async resetPassword(params, pobj2, req) {
try {
return await this.userSve.delUser(params);
let p = {
id: req.loginUser.id,
uctype_id: params.uctype_id,
oldPassword: this.trim(params.oldPassword),
newPassword: this.trim(params.newPassword),
newPasswordConfirm: this.trim(params.newPasswordConfirm),
};
if (!p.newPassword) {
return system.getResult(null, "修改密码失败,新密码不能为空");
}
if (p.newPassword != p.newPasswordConfirm) {
return system.getResult(null, "修改密码失败,两次密码输入不一致");
}
return await this.userSve.resetPassword(p);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
......
......@@ -38,6 +38,14 @@ class UserService extends ServiceBase {
}
}
async resetPassword(params) {
try {
return await this.callms("sve_uc", "userResetPassword", params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
async mapByIds(params) {
try {
return await this.callms("sve_uc", "userMapByIds", params);
......
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