登陆跳转转交登陆页面处理

Former-commit-id: cfd1438def08f0c214df214e42e8fa54433b29ed [formerly cfd1438def08f0c214df214e42e8fa54433b29ed [formerly cfd1438def08f0c214df214e42e8fa54433b29ed [formerly cfd1438def08f0c214df214e42e8fa54433b29ed [formerly 850c00a248f8dace4cdb42cdda77dfbf528b8e15 [formerly e43dc23c06b5e7addc34b225e0d7512afa4cbf88]]]]]
Former-commit-id: b7a006b238aee7cfd6bbcd587fc1826aa53f9ecc
Former-commit-id: bba6b8fb7a93cb3363d4109490ea54a3a0066f4c
Former-commit-id: bbb7c9d3c44357c023c7194b1c85f529aa048fbc [formerly fa2a2a5a267fe5a96c5e82cc0c1650eb024da71b]
Former-commit-id: 383bf4b86f457cff9830e54bf43340e42a2045ab
Former-commit-id: 348c1d718cd6c5441c2b721fd6efd30a8f231838
Former-commit-id: 4c9476c29fb68d59150d2b0992dc20bbd2d588ad
Former-commit-id: 7bd01ddd895e182be3d7a24267c4721376225bd3
Former-commit-id: 70079fa65f5107867d7bb5b460f3d24563b61e9c
This commit is contained in:
liyang
2018-11-17 22:31:41 +08:00
parent 9e3aed173b
commit 36a09f9c3d
3 changed files with 43 additions and 36 deletions

View File

@@ -141,6 +141,16 @@ export default {
username: this.formLogin.username,
password: this.formLogin.password
})
.then(() => {
const redirect = this.$route.query.redirect
if (redirect) {
// 重定向到指定的页面
this.$router.replace(redirect)
} else {
// 重定向到开始路径
this.$router.replace('/')
}
})
} else {
// 登录表单校验失败
this.$message.error('表单校验失败')