|
@@ -3,23 +3,13 @@
|
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
<h3 class="title">后台管理系统</h3>
|
|
<h3 class="title">后台管理系统</h3>
|
|
<el-form-item prop="username">
|
|
<el-form-item prop="username">
|
|
- <el-input
|
|
|
|
- v-model="loginForm.username"
|
|
|
|
- type="text"
|
|
|
|
- auto-complete="off"
|
|
|
|
- placeholder="账号"
|
|
|
|
- >
|
|
|
|
|
|
+ <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" />
|
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item prop="password">
|
|
<el-form-item prop="password">
|
|
- <el-input
|
|
|
|
- v-model="loginForm.password"
|
|
|
|
- type="password"
|
|
|
|
- auto-complete="off"
|
|
|
|
- placeholder="密码"
|
|
|
|
- @keyup.enter.native="handleLogin"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
|
|
|
+ @keyup.enter.native="handleLogin">
|
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -39,13 +29,8 @@
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
|
<el-form-item style="width:100%;">
|
|
<el-form-item style="width:100%;">
|
|
- <el-button
|
|
|
|
- :loading="loading"
|
|
|
|
- size="medium"
|
|
|
|
- type="primary"
|
|
|
|
- style="width:100%;"
|
|
|
|
- @click.native.prevent="handleLogin"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
|
|
|
|
+ @click.native.prevent="handleLogin">
|
|
<span v-if="!loading">登 录</span>
|
|
<span v-if="!loading">登 录</span>
|
|
<span v-else>登 录 中...</span>
|
|
<span v-else>登 录 中...</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -56,7 +41,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 底部 -->
|
|
<!-- 底部 -->
|
|
<div class="el-login-footer">
|
|
<div class="el-login-footer">
|
|
- <span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
|
|
|
|
|
|
+ <span>Copyright © 2018-2022 Shenzhen Airsmart Technology Co.,Ltd. All Rights Reserved.</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -72,8 +57,8 @@ export default {
|
|
return {
|
|
return {
|
|
codeUrl: "",
|
|
codeUrl: "",
|
|
loginForm: {
|
|
loginForm: {
|
|
- username: "admin",
|
|
|
|
- password: "admin123",
|
|
|
|
|
|
+ username: "", // admin
|
|
|
|
+ password: "", // admin123
|
|
rememberMe: false,
|
|
rememberMe: false,
|
|
code: "",
|
|
code: "",
|
|
uuid: ""
|
|
uuid: ""
|
|
@@ -89,7 +74,7 @@ export default {
|
|
},
|
|
},
|
|
loading: false,
|
|
loading: false,
|
|
// 验证码开关
|
|
// 验证码开关
|
|
- captchaOnOff: true,
|
|
|
|
|
|
+ captchaOnOff: false,
|
|
// 注册开关
|
|
// 注册开关
|
|
register: false,
|
|
register: false,
|
|
redirect: undefined
|
|
redirect: undefined
|
|
@@ -97,7 +82,7 @@ export default {
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
$route: {
|
|
$route: {
|
|
- handler: function(route) {
|
|
|
|
|
|
+ handler: function (route) {
|
|
this.redirect = route.query && route.query.redirect;
|
|
this.redirect = route.query && route.query.redirect;
|
|
},
|
|
},
|
|
immediate: true
|
|
immediate: true
|
|
@@ -141,7 +126,7 @@ export default {
|
|
Cookies.remove('rememberMe');
|
|
Cookies.remove('rememberMe');
|
|
}
|
|
}
|
|
this.$store.dispatch("Login", this.loginForm).then(() => {
|
|
this.$store.dispatch("Login", this.loginForm).then(() => {
|
|
- this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
|
|
|
|
|
+ this.$router.push({ path: this.redirect || "/" }).catch(() => { });
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
if (this.captchaOnOff) {
|
|
if (this.captchaOnOff) {
|
|
@@ -161,7 +146,7 @@ export default {
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
height: 100%;
|
|
height: 100%;
|
|
- background-image: url("../assets/images/login-background.jpg");
|
|
|
|
|
|
+ background-image: url('../assets/images/login-background.jpg');
|
|
background-size: cover;
|
|
background-size: cover;
|
|
}
|
|
}
|
|
.title {
|
|
.title {
|