|
@@ -40,6 +40,7 @@
|
|
style="width:100%;margin-bottom:30px;"
|
|
style="width:100%;margin-bottom:30px;"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
@click.native.prevent="handleLogin"
|
|
@click.native.prevent="handleLogin"
|
|
|
|
+ class="green-btn"
|
|
>登录</el-button>
|
|
>登录</el-button>
|
|
</el-form>
|
|
</el-form>
|
|
</el-card>
|
|
</el-card>
|
|
@@ -105,9 +106,12 @@ export default {
|
|
|
|
|
|
self.$store
|
|
self.$store
|
|
.dispatch("user/login", self.loginForm)
|
|
.dispatch("user/login", self.loginForm)
|
|
- .then(() => {
|
|
|
|
- self.$router.push({ path: this.redirect || "/home" });
|
|
|
|
|
|
+ .then((result) => {
|
|
self.loading = false;
|
|
self.loading = false;
|
|
|
|
+
|
|
|
|
+ if(result){
|
|
|
|
+ self.$router.push({ path: this.redirect || "/home" });
|
|
|
|
+ }
|
|
})
|
|
})
|
|
.catch(error => {
|
|
.catch(error => {
|
|
self.loading = false;
|
|
self.loading = false;
|
|
@@ -235,5 +239,9 @@ $text_color: black;
|
|
right: 35px;
|
|
right: 35px;
|
|
bottom: 28px;
|
|
bottom: 28px;
|
|
}
|
|
}
|
|
|
|
+ .green-btn{
|
|
|
|
+ background-color:#64a63c;
|
|
|
|
+ border-color: #64a63c;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|