Commit bd3e03fa by yanju

fix-issue#7

parent 87ca9a71
...@@ -87,8 +87,15 @@ export default { ...@@ -87,8 +87,15 @@ export default {
passwordErrMsg: '', // 密码错误 提示信息 passwordErrMsg: '', // 密码错误 提示信息
verifyErrMsg: '', // 验证码错误 提示信息 verifyErrMsg: '', // 验证码错误 提示信息
isCount: false, // 是否开始倒计时 isCount: false, // 是否开始倒计时
from:'/'
} }
}, },
beforeRouteEnter(to, from, next) {
next(vm => {
vm.from = from.fullPath
});
},
methods: { methods: {
// 显示为密码登录 // 显示为密码登录
handleLoginPassword() { handleLoginPassword() {
...@@ -199,7 +206,7 @@ export default { ...@@ -199,7 +206,7 @@ export default {
type: 'success', type: 'success',
message: '登录成功!' message: '登录成功!'
}); });
this.$router.push('/') this.$router.push(this.from)
} else { } else {
store.commit('auth/logout'); store.commit('auth/logout');
store.commit('userProfile/removeUser') store.commit('userProfile/removeUser')
...@@ -207,7 +214,6 @@ export default { ...@@ -207,7 +214,6 @@ export default {
} else if (authResponse !== undefined) { } else if (authResponse !== undefined) {
// 认证失败 // 认证失败
// errorCode(authResponse); // errorCode(authResponse);
console.log(authResponse);
if (authResponse.code === 1002) { if (authResponse.code === 1002) {
this.passwordErrMsg = authResponse.msg; this.passwordErrMsg = authResponse.msg;
} else if (authResponse.code === 1001) { } else if (authResponse.code === 1001) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment