| | |
| | | <template> |
| | | <div class="login"> |
| | | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <h3 class="title">若依后台管理系统</h3> |
| | | <h3 class="title">RuoYi-Vue-Plus后台管理系统</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" /> |
| | |
| | | </el-form> |
| | | <!-- 底部 --> |
| | | <div class="el-login-footer"> |
| | | <span>Copyright © 2018-2020 ruoyi.vip All Rights Reserved.</span> |
| | | <span>Copyright © 2018-2021 ruoyi.vip All Rights Reserved.</span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | Cookies.remove("password"); |
| | | Cookies.remove('rememberMe'); |
| | | } |
| | | this.$store |
| | | .dispatch("Login", this.loginForm) |
| | | .then(() => { |
| | | this.$router.push({ path: this.redirect || "/" }); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | | this.getCode(); |
| | | }); |
| | | this.$store.dispatch("Login", this.loginForm).then(() => { |
| | | this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); |
| | | }).catch(() => { |
| | | this.loading = false; |
| | | this.getCode(); |
| | | }); |
| | | } |
| | | }); |
| | | } |