|
|
@ -1,87 +1,43 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="login" :style="'background-image:url(' + Background + ');'"> |
|
|
<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"> |
|
|
|
|
|
阅行集成后台管理 |
|
|
|
|
|
</h3> |
|
|
|
|
|
|
|
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form"> |
|
|
|
|
|
<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="账号" |
|
|
|
|
|
> |
|
|
|
|
|
<svg-icon |
|
|
|
|
|
slot="prefix" |
|
|
|
|
|
icon-class="user" |
|
|
|
|
|
class="el-input__icon input-icon" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<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-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" |
|
|
|
|
|
> |
|
|
|
|
|
<svg-icon |
|
|
|
|
|
slot="prefix" |
|
|
|
|
|
icon-class="password" |
|
|
|
|
|
class="el-input__icon input-icon" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<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" /> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="code"> |
|
|
<el-form-item prop="code"> |
|
|
<el-input |
|
|
|
|
|
v-model="loginForm.code" |
|
|
|
|
|
auto-complete="off" |
|
|
|
|
|
placeholder="验证码" |
|
|
|
|
|
style="width: 63%" |
|
|
|
|
|
@keyup.enter.native="handleLogin" |
|
|
|
|
|
> |
|
|
|
|
|
<svg-icon |
|
|
|
|
|
slot="prefix" |
|
|
|
|
|
icon-class="validCode" |
|
|
|
|
|
class="el-input__icon input-icon" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin"> |
|
|
|
|
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> |
|
|
</el-input> |
|
|
</el-input> |
|
|
<div class="login-code"> |
|
|
<div class="login-code"> |
|
|
<img :src="codeUrl" @click="getCode" /> |
|
|
|
|
|
|
|
|
<img :src="codeUrl" @click="getCode"> |
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;"> |
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;"> |
|
|
记住我 |
|
|
记住我 |
|
|
</el-checkbox> |
|
|
</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> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<!-- 底部 --> |
|
|
<!-- 底部 --> |
|
|
<div v-if="$store.state.settings.showFooter" id="el-login-footer"> |
|
|
|
|
|
|
|
|
<!-- <div v-if="$store.state.settings.showFooter" id="el-login-footer"> |
|
|
<span v-html="$store.state.settings.footerTxt" /> |
|
|
<span v-html="$store.state.settings.footerTxt" /> |
|
|
<span> ⋅ </span> |
|
|
<span> ⋅ </span> |
|
|
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{ |
|
|
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{ |
|
|
$store.state.settings.caseNumber |
|
|
$store.state.settings.caseNumber |
|
|
}}</a> |
|
|
}}</a> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> --> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -201,13 +157,10 @@ export default { |
|
|
Cookies.remove('password') |
|
|
Cookies.remove('password') |
|
|
Cookies.remove('rememberMe') |
|
|
Cookies.remove('rememberMe') |
|
|
} |
|
|
} |
|
|
this.$store |
|
|
|
|
|
.dispatch('Login', user) |
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
|
this.$store.dispatch('Login', user).then(() => { |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
this.$router.push({ path: this.redirect || '/' }) |
|
|
this.$router.push({ path: this.redirect || '/' }) |
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
|
}).catch(() => { |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
this.getCode() |
|
|
this.getCode() |
|
|
}) |
|
|
}) |
|
|
|