|
|
@ -3,11 +3,11 @@
|
|
|
|
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px"
|
|
|
|
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px"
|
|
|
|
class="card-box login-form">
|
|
|
|
class="card-box login-form">
|
|
|
|
<h3 class="title">系统登录</h3>
|
|
|
|
<h3 class="title">系统登录</h3>
|
|
|
|
<el-form-item prop="email">
|
|
|
|
<el-form-item prop="username">
|
|
|
|
<span class="svg-container">
|
|
|
|
<span class="svg-container svg-container_login">
|
|
|
|
<icon-svg icon-class="email"></icon-svg>
|
|
|
|
<icon-svg icon-class="yonghuming" />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input name="email" type="text" v-model="loginForm.email" autoComplete="on" placeholder="邮箱"></el-input>
|
|
|
|
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="邮箱" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="password">
|
|
|
|
<el-form-item prop="password">
|
|
|
|
<span class="svg-container">
|
|
|
|
<span class="svg-container">
|
|
|
@ -21,21 +21,21 @@
|
|
|
|
登录
|
|
|
|
登录
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div>
|
|
|
|
<div class='tips'>账号:admin 密码随便填</div>
|
|
|
|
<div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div>
|
|
|
|
<div class='tips'>账号:editor 密码随便填</div>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { isWscnEmail } from '@/utils/validate'
|
|
|
|
import { isvalidUsername } from '@/utils/validate'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'login',
|
|
|
|
name: 'login',
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
const validateEmail = (rule, value, callback) => {
|
|
|
|
const validateUsername = (rule, value, callback) => {
|
|
|
|
if (!isWscnEmail(value)) {
|
|
|
|
if (!isvalidUsername(value)) {
|
|
|
|
callback(new Error('请输入正确的合法邮箱'))
|
|
|
|
callback(new Error('请输入正确的用户名'))
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
callback()
|
|
|
|
callback()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -49,16 +49,12 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
loginForm: {
|
|
|
|
loginForm: {
|
|
|
|
email: 'admin@wallstreetcn.com',
|
|
|
|
username: 'admin',
|
|
|
|
password: '111111'
|
|
|
|
password: '111111'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loginRules: {
|
|
|
|
loginRules: {
|
|
|
|
email: [
|
|
|
|
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
|
|
|
{ required: true, trigger: 'blur', validator: validateEmail }
|
|
|
|
password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
|
|
|
],
|
|
|
|
|
|
|
|
password: [
|
|
|
|
|
|
|
|
{ required: true, trigger: 'blur', validator: validatePass }
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loading: false
|
|
|
|
loading: false
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -86,16 +82,14 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
.tips {
|
|
|
|
$bg:#2d3a4b;
|
|
|
|
font-size: 14px;
|
|
|
|
$dark_gray:#889aa4;
|
|
|
|
color: #fff;
|
|
|
|
$light_gray:#eee;
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.login-container {
|
|
|
|
.login-container {
|
|
|
|
@include relative;
|
|
|
|
@include relative;
|
|
|
|
height: 100vh;
|
|
|
|
height: 100vh;
|
|
|
|
background-color: #2d3a4b;
|
|
|
|
background-color: $bg;
|
|
|
|
input:-webkit-autofill {
|
|
|
|
input:-webkit-autofill {
|
|
|
|
-webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
|
|
|
|
-webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
|
|
|
|
-webkit-text-fill-color: #fff !important;
|
|
|
|
-webkit-text-fill-color: #fff !important;
|
|
|
@ -106,7 +100,7 @@ export default {
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
border-radius: 0px;
|
|
|
|
border-radius: 0px;
|
|
|
|
padding: 12px 5px 12px 15px;
|
|
|
|
padding: 12px 5px 12px 15px;
|
|
|
|
color: #eeeeee;
|
|
|
|
color: $light_gray;
|
|
|
|
height: 47px;
|
|
|
|
height: 47px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.el-input {
|
|
|
|
.el-input {
|
|
|
@ -114,14 +108,25 @@ export default {
|
|
|
|
height: 47px;
|
|
|
|
height: 47px;
|
|
|
|
width: 85%;
|
|
|
|
width: 85%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tips {
|
|
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
|
|
}
|
|
|
|
.svg-container {
|
|
|
|
.svg-container {
|
|
|
|
padding: 6px 5px 6px 15px;
|
|
|
|
padding: 6px 5px 6px 15px;
|
|
|
|
color: #889aa4;
|
|
|
|
color: $dark_gray;
|
|
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
width: 30px;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
&_login {
|
|
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.title {
|
|
|
|
.title {
|
|
|
|
font-size: 26px;
|
|
|
|
font-size: 26px;
|
|
|
|
font-weight: 400;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #eeeeee;
|
|
|
|
color: $light_gray;
|
|
|
|
margin: 0px auto 40px auto;
|
|
|
|
margin: 0px auto 40px auto;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
@ -140,8 +145,18 @@ export default {
|
|
|
|
border-radius: 5px;
|
|
|
|
border-radius: 5px;
|
|
|
|
color: #454545;
|
|
|
|
color: #454545;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.forget-pwd {
|
|
|
|
.show-pwd {
|
|
|
|
color: #fff;
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
right: 10px;
|
|
|
|
|
|
|
|
top: 7px;
|
|
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
|
|
color: $dark_gray;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.thirdparty-button{
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
right: 35px;
|
|
|
|
|
|
|
|
bottom: 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|