Commit bd3e03fa by yanju

fix-issue#7

parent 87ca9a71
......@@ -87,8 +87,15 @@ export default {
passwordErrMsg: '', // 密码错误 提示信息
verifyErrMsg: '', // 验证码错误 提示信息
isCount: false, // 是否开始倒计时
from:'/'
}
},
beforeRouteEnter(to, from, next) {
next(vm => {
vm.from = from.fullPath
});
},
methods: {
// 显示为密码登录
handleLoginPassword() {
......@@ -199,7 +206,7 @@ export default {
type: 'success',
message: '登录成功!'
});
this.$router.push('/')
this.$router.push(this.from)
} else {
store.commit('auth/logout');
store.commit('userProfile/removeUser')
......@@ -207,7 +214,6 @@ export default {
} else if (authResponse !== undefined) {
// 认证失败
// errorCode(authResponse);
console.log(authResponse);
if (authResponse.code === 1002) {
this.passwordErrMsg = authResponse.msg;
} 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