| | |
| | | }); |
| | | this.$store.dispatch("LoginByUsername", this.loginForm).then((data) => { |
| | | if (data.obj.failCode !== 'loginSuccess') { |
| | | // console.log('data', data); |
| | | if (data.obj.failCode === 'passwordRemainDay') { |
| | | this.$message.warning(data.obj.passwordInfo); |
| | | this.$router.push({path: this.tagWel.value}); |
| | | loading.close(); |
| | | return; |
| | | } |
| | | |
| | | if (data.obj.failCode === 'userIsLocked') { |
| | | this.$message.error(`登录错误次数过多,账号被锁定【${data.obj.failMsgArray[0]}】分钟`); |
| | | loading.close(); |
| | | return; |
| | | } |
| | | this.$message.error(data.msg); |
| | | |
| | | if (data.obj.mustChangePassword) { |
| | | this.passwordVisible = true; |
| | | } |
| | |
| | | this.passwordVisible = false; |
| | | this.$refs.changeForm.resetFields(); |
| | | this.$store.dispatch("LoginByUsername", {...this.loginForm, password: form.confirmPassword}).then(data => { |
| | | if (data.obj.failCode !== 'loginSuccess') { |
| | | if (data.obj.failCode !== 'loginSuccess' && data.obj.failCode !== 'passwordRemainDay') { |
| | | this.$message.error(data.msg); |
| | | } |
| | | this.$router.push({path: this.tagWel.value}); |