diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js index 25c2286..ba21cbd 100644 --- a/constant/UrlConstant.js +++ b/constant/UrlConstant.js @@ -18,7 +18,7 @@ const listOwnerRepairs = baseUrl + 'app/ownerRepair.listOwnerRepairs'; //家庭 const queryStaffInfos = baseUrl + 'app/query.staff.infos'; //查询员工信息 -const queryOwnerMembers = baseUrl + 'app/owner.queryOwnerMembers'; //投诉建议列表 +const changeStaffPwd = baseUrl + 'app/user.changeStaffPwd'; //修改密码 const listComplaints = baseUrl + 'app/complaint.listComplaints'; //添加投诉建议 @@ -68,7 +68,7 @@ module.exports = { queryStaffInfos: queryStaffInfos, appUserBindingOwner: appUserBindingOwner, queryAppUserBindingOwner: queryAppUserBindingOwner, - queryOwnerMembers: queryOwnerMembers, + changeStaffPwd: changeStaffPwd, listComplaints: listComplaints, saveComplaint: saveComplaint, appUserUnBindingOwner: appUserUnBindingOwner, diff --git a/pages/changePwd/changePwd.vue b/pages/changePwd/changePwd.vue index 1c360a4..36c24f7 100644 --- a/pages/changePwd/changePwd.vue +++ b/pages/changePwd/changePwd.vue @@ -67,6 +67,39 @@ return; } + let _userInfo = { + userId: this.java110Context.getUserInfo().userId, + oldPwd: this.oldPwd, + newPwd: this.newPwd + } + + uni.request({ + url: this.java110Constant.url.changeStaffPwd, + header: this.java110Context.getHeaders(), + method: "POST", + data: _userInfo, + success: function(res) { + if(res.statusCode != 200){ + uni.showToast({ + icon:"none", + title: res.data + }); + return ; + } + + uni.navigateBack({ + delta:1 + }); + }, + fail: function(error) { + // 调用服务端登录接口失败 + uni.showToast({ + title: '调用接口失败' + }); + console.log(error); + } + }); + }