前端跳转
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="login" :style="'background-image:url('+ Background +');'">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
|
||||
<h3 class="title">
|
||||
{{title}}</h3>
|
||||
{{ title }}</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
@@ -133,8 +133,13 @@ export default {
|
||||
Cookies.remove('rememberMe')
|
||||
}
|
||||
this.$store.dispatch('Login', user).then(() => {
|
||||
debugger
|
||||
this.loading = false
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
window.location.href = this.redirect
|
||||
// if (this.redirect === 'http://localhost:8013/dashboard'){
|
||||
// window.location.href = this.redirect
|
||||
// }
|
||||
// this.$router.push({ path: this.redirect || '/' })
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.getCode()
|
||||
|
||||
Reference in New Issue
Block a user