修改原始密码

zhangtao
laozt 1 year ago
parent d7e8b2cfd4
commit 69c1b9b835

@ -45,15 +45,15 @@ export default {
// console.log(newVal, oldVal); // console.log(newVal, oldVal);
// //
let _this = this let _this = this
// if (newVal) { if (newVal) {
// this.$alert("", "", { this.$alert("您的密码为原始密码,需要修改!", "警告信息", {
// confirmButtonText: "", confirmButtonText: "确定",
// showClose: false, showClose: false,
// callback: (action) => { callback: (action) => {
// _this.$router.push("/user/profile"); _this.$router.push("/user/profile");
// }, },
// }); });
// } }
}, },
}, },
}; };

@ -147,7 +147,6 @@ export default {
location.href = "/login?redirect=%2Findex"; location.href = "/login?redirect=%2Findex";
} }
localStorage.removeItem("IS_ORG_PWD");
}); });
}) })
.catch(() => {}); .catch(() => {});

@ -78,12 +78,26 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
let _this = this;
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then( updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
(response) => { (response) => {
this.$modal.msgSuccess("修改成功"); 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() { close() {
// this.$tab.closePage(); // 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",
});
}
}, },
}, },
}; };

Loading…
Cancel
Save