代码精简
Former-commit-id: 68a84238811ed590b304923a2b42bcf6384867fe [formerly 68a84238811ed590b304923a2b42bcf6384867fe [formerly 68a84238811ed590b304923a2b42bcf6384867fe [formerly 68a84238811ed590b304923a2b42bcf6384867fe [formerly 3472325eec8f65beebf534c1f31cf8043ebd6785 [formerly bf4733316918d82082684fd64fac36586b7ea07c]]]]] Former-commit-id: 58341149d14a4f2ba6fd5d694304f883b0a1222d Former-commit-id: ac566b4f5e3b842aead01a4ce39b93f78c8d612e Former-commit-id: 23361c4d6dd8d65e48e4f6e6f69d9f1b01002d13 [formerly 15711328fce2e76881607c92ae1403f719cf6612] Former-commit-id: bead5fa6438e7dfcb2778a6d0ecb572502c54d8f Former-commit-id: 1cd4384f7382b9d31c3748d4b5355262b2340b04 Former-commit-id: 331c9b8209c3ad71b3b15cb643b9893de607bf5e Former-commit-id: cd2093ec4b185b5995352347a6d9159813c039e1 Former-commit-id: eb21ac91df52ace1c60e4dfa3c6da487bb38c387
This commit is contained in:
@@ -142,14 +142,8 @@ export default {
|
||||
password: this.formLogin.password
|
||||
})
|
||||
.then(() => {
|
||||
const redirect = this.$route.query.redirect
|
||||
if (redirect) {
|
||||
// 重定向到指定的页面
|
||||
this.$router.replace(redirect)
|
||||
} else {
|
||||
// 重定向到开始路径
|
||||
this.$router.replace('/')
|
||||
}
|
||||
// 重定向对象不存着则返回顶层路径
|
||||
this.$router.replace(this.$route.query.redirect || '/')
|
||||
})
|
||||
} else {
|
||||
// 登录表单校验失败
|
||||
|
||||
Reference in New Issue
Block a user