From 69c1b9b835dcace1e96446cf3509d5d6b5f79f3a Mon Sep 17 00:00:00 2001 From: laozt <2721205210@qq.com> Date: Fri, 22 Dec 2023 14:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=9F=E5=A7=8B=E5=AF=86?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 18 ++++++------ src/layout/newyjLayout.vue | 1 - src/views/system/userc/profile/resetPwd.vue | 31 +++++++++++++++++++-- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/App.vue b/src/App.vue index c36d24c..69a7a68 100644 --- a/src/App.vue +++ b/src/App.vue @@ -45,15 +45,15 @@ export default { // console.log(newVal, oldVal); // 还是调个接口 let _this = this - // if (newVal) { - // this.$alert("您的密码为原始密码,需要修改!", "警告信息", { - // confirmButtonText: "确定", - // showClose: false, - // callback: (action) => { - // _this.$router.push("/user/profile"); - // }, - // }); - // } + if (newVal) { + this.$alert("您的密码为原始密码,需要修改!", "警告信息", { + confirmButtonText: "确定", + showClose: false, + callback: (action) => { + _this.$router.push("/user/profile"); + }, + }); + } }, }, }; diff --git a/src/layout/newyjLayout.vue b/src/layout/newyjLayout.vue index 3360c35..e509d5f 100644 --- a/src/layout/newyjLayout.vue +++ b/src/layout/newyjLayout.vue @@ -147,7 +147,6 @@ export default { location.href = "/login?redirect=%2Findex"; } - localStorage.removeItem("IS_ORG_PWD"); }); }) .catch(() => {}); diff --git a/src/views/system/userc/profile/resetPwd.vue b/src/views/system/userc/profile/resetPwd.vue index d04a5ac..59392d1 100644 --- a/src/views/system/userc/profile/resetPwd.vue +++ b/src/views/system/userc/profile/resetPwd.vue @@ -78,12 +78,26 @@ export default { }, methods: { submit() { + let _this = this; this.$refs["form"].validate((valid) => { if (valid) { updateUserPwd(this.user.oldPassword, this.user.newPassword).then( (response) => { this.$modal.msgSuccess("修改成功"); - window.history.back(); //返回上一页 + // 修改成功退出登录 + this.$store.dispatch("LogOut").then(() => { + let isGovernmentAffairsNetwork = localStorage.getItem( + "isGovernmentAffairsNetwork" + ); + // console.log("进入跳转政务网的登录页"); + if (isGovernmentAffairsNetwork == "1") { + localStorage.removeItem("isGovernmentAffairsNetwork"); + location.href = process.env.VUE_APP_SSO_LOGOUT_N; + } else { + localStorage.removeItem("isGovernmentAffairsNetwork"); + location.href = "/login?redirect=%2Findex"; + } + }); } ); } @@ -91,7 +105,20 @@ export default { }, close() { // this.$tab.closePage(); - window.history.back(); //返回上一页 + // window.history.back(); //返回上一页 + this.ifUser(); + }, + ifUser() { + let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO")); + if (userInfo.lawLevel == "县级" || userInfo.lawLevel == "镇级") { + this.$router.replace({ + path: "/planManage", + }); + } else { + this.$router.replace({ + path: "/home", + }); + } }, }, };