From a46548a0b75e54a24f28524f7ed315a1159f2408 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Wed, 26 Feb 2020 22:24:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 12 +++++ pages/changePwd/changePwd.vue | 79 +++++++++++++++++++++++++++++ pages/my/my.vue | 16 +++++- pages/userInfo/userInfo.vue | 94 +++++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 pages/changePwd/changePwd.vue create mode 100644 pages/userInfo/userInfo.vue diff --git a/pages.json b/pages.json index 1bced5a..8ce0b82 100644 --- a/pages.json +++ b/pages.json @@ -55,6 +55,18 @@ "navigationBarTitleText": "切换小区" } } + ,{ + "path" : "pages/userInfo/userInfo", + "style" : { + "navigationBarTitleText": "个人信息" + } + } + ,{ + "path" : "pages/changePwd/changePwd", + "style" : { + "navigationBarTitleText": "修改密码" + } + } ], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/pages/changePwd/changePwd.vue b/pages/changePwd/changePwd.vue new file mode 100644 index 0000000..1c360a4 --- /dev/null +++ b/pages/changePwd/changePwd.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/pages/my/my.vue b/pages/my/my.vue index 07ee1fd..285a74b 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -24,6 +24,12 @@ 个人信息 + + + + 修改密码 + + @@ -74,7 +80,15 @@ }, //用户信息 _userInfo:function(){ - + uni.navigateTo({ + url:"/pages/userInfo/userInfo" + }); + }, + //修改密码 + _changePwd:function(){ + uni.navigateTo({ + url:"/pages/changePwd/changePwd" + }); } } diff --git a/pages/userInfo/userInfo.vue b/pages/userInfo/userInfo.vue new file mode 100644 index 0000000..52da5d3 --- /dev/null +++ b/pages/userInfo/userInfo.vue @@ -0,0 +1,94 @@ + + + + + From b3a0e3905f6efaaaa32c6155cdce55a7a3d7ae0a Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Wed, 26 Feb 2020 23:14:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constant/UrlConstant.js | 4 ++-- pages/changePwd/changePwd.vue | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) 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); + } + }); + } From 4ebfc2cc5a5b26f5223abc652b508ca2915c8eb1 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Thu, 27 Feb 2020 00:43:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- context/Java110Context.js | 2 ++ factory/LoginFactory.js | 2 +- pages/changePwd/changePwd.vue | 2 +- pages/login/login.vue | 5 ++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/context/Java110Context.js b/context/Java110Context.js index 95bf8fe..07674d8 100644 --- a/context/Java110Context.js +++ b/context/Java110Context.js @@ -177,6 +177,8 @@ const getCommunity = function (callBack,reload,_condition) { _condition = {}; } + console.log('_condition',_condition); + _condition.userId = _userInfo.userId; _condition.storeId = _userInfo.storeId; diff --git a/factory/LoginFactory.js b/factory/LoginFactory.js index 90aa14d..bbf360a 100644 --- a/factory/LoginFactory.js +++ b/factory/LoginFactory.js @@ -53,7 +53,7 @@ class LoginFactory { console.log("用户信息",userInfo); if(userInfo == null || userInfo == undefined || userInfo == ''){ - uni.redirectTo({ + uni.navigateTo({ url:"/pages/login/login" }) diff --git a/pages/changePwd/changePwd.vue b/pages/changePwd/changePwd.vue index 36c24f7..3ba4396 100644 --- a/pages/changePwd/changePwd.vue +++ b/pages/changePwd/changePwd.vue @@ -71,7 +71,7 @@ userId: this.java110Context.getUserInfo().userId, oldPwd: this.oldPwd, newPwd: this.newPwd - } + }; uni.request({ url: this.java110Constant.url.changeStaffPwd, diff --git a/pages/login/login.vue b/pages/login/login.vue index cff3350..875a3a0 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -101,9 +101,12 @@ expireTime: afterOneHourDate.getTime(), createTime: new Date().getTime() }); - uni.switchTab({ + + uni.reLaunch({ url: "/pages/index/index" }); + + }, fail: function(error) { // 调用服务端登录接口失败