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", + }); + } }, }, };