登录密码校验

演示数据2.0
anthonywj 1 year ago
parent 835a00383f
commit 74a103a40c

@ -71,7 +71,6 @@ const user = {
actions: { actions: {
// 登录 // 登录
Login({commit}, userInfo) { Login({commit}, userInfo) {
debugger
const username = userInfo.username.trim() const username = userInfo.username.trim()
const password = sha256(userInfo.password) const password = sha256(userInfo.password)
const code = userInfo.code const code = userInfo.code

@ -1821,7 +1821,6 @@ export default {
this.getConfig(); this.getConfig();
if (this.$isNotBlank(this.orderQuery.billNo)) { if (this.$isNotBlank(this.orderQuery.billNo)) {
// //
debugger
this.corpOrderIdDisabled = true; this.corpOrderIdDisabled = true;
this.orderFormData = this.orderQuery; this.orderFormData = this.orderQuery;
this.actionEnable = true; this.actionEnable = true;

@ -600,7 +600,6 @@ export default {
getList() { getList() {
let params = {orderIdFk: this.formData.orderId}; let params = {orderIdFk: this.formData.orderId};
getCountOrderDetailList(params).then((res) => { getCountOrderDetailList(params).then((res) => {
debugger
if (res.code === 20000) { if (res.code === 20000) {
console.log(res.data) console.log(res.data)
this.countProductList = res.data.list || []; this.countProductList = res.data.list || [];

@ -315,6 +315,7 @@ export default {
this.$store this.$store
.dispatch("Login", this.loginForm) .dispatch("Login", this.loginForm)
.then((res) => { .then((res) => {
console.log(res)
if (res.data.needChangePwd == true) { if (res.data.needChangePwd == true) {
this.$confirm('系统检测到您的密码长时间未修改,为保证您的账号安全建议立即修改密码?', '提示', { this.$confirm('系统检测到您的密码长时间未修改,为保证您的账号安全建议立即修改密码?', '提示', {
confirmButtonText: '立即修改', confirmButtonText: '立即修改',
@ -328,6 +329,9 @@ export default {
confirmPassword: "", confirmPassword: "",
}; };
}).catch(() => { }).catch(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = process.env.VUE_APP_CONTEXT_PATH;
})
this.$router this.$router
.push({path: this.redirect || "/"}) .push({path: this.redirect || "/"})
.catch((res) => { .catch((res) => {
@ -343,10 +347,32 @@ export default {
}) })
.catch((res) => { .catch((res) => {
this.loading = false; this.loading = false;
if (res == "密码已过期,请修改密码") {
this.$confirm('密码已过期请立即修改密码?', '提示', {
confirmButtonText: '立即修改',
type: 'warning'
}).then(() => {
this.passwordFormVisible = true;
this.passwordFormData = {
oldPassword: "",
newPassword: "",
confirmPassword: "",
};
}).catch(() => {
this.$router
.push({path: this.redirect || "/"})
.catch((res) => {
});
});
} else {
this.$message.error(res); this.$message.error(res);
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.getCode(); this.getCode();
} }
}
}); });
} else { } else {
this.$message({ this.$message({

@ -276,7 +276,6 @@ export default {
}, },
// //
findMethod(query) { findMethod(query) {
debugger
this.fromOptions = [] this.fromOptions = []
let cQuery = { let cQuery = {
key: query, key: query,

Loading…
Cancel
Save