Commit a81e8b4a by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !6
parents 105abc71 4ce66a95
...@@ -56,7 +56,7 @@ service.interceptors.response.use(response => { ...@@ -56,7 +56,7 @@ service.interceptors.response.use(response => {
}); });
// -2:其他客户端登录了;Token 过期了; // -2:其他客户端登录了;Token 过期了;
if (res.code === '-2') { if (res.code === -2) {
if (logout) return; if (logout) return;
logout = true; logout = true;
MessageBox.confirm( MessageBox.confirm(
......
<template> <template>
<div class="tab-container"> <div class="tab-container">
homePage <img src="@/assets/images/request_timeout@3x.png" alt="">
</div> </div>
</template> </template>
......
<template> <template>
<div class="login-container"> <div class="login-container">
<div class="login-form-wrpa">
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px" class="card-box login-form"> <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px" class="card-box login-form">
<h3 class="title">{{title}}</h3> <!-- <div class="title">{{title}}</div> -->
<el-form-item prop="username"> <div class="title">成师后勤管理系统</div>
<el-form-item class="loginFormItem" prop="username">
<span class="svg-container svg-container_login"> <span class="svg-container svg-container_login">
<svg-icon icon-class="user" /> <svg-icon icon-class="user" />
</span> </span>
<el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" /> <el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" />
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item class="loginFormItem" prop="password">
<span class="svg-container"> <span class="svg-container">
<svg-icon icon-class="password"></svg-icon> <svg-icon icon-class="password"></svg-icon>
</span> </span>
...@@ -28,6 +30,7 @@ ...@@ -28,6 +30,7 @@
</div> --> </div> -->
</el-form> </el-form>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -112,6 +115,8 @@ $light_gray: #eee; ...@@ -112,6 +115,8 @@ $light_gray: #eee;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: $bg; background-color: $bg;
background-image: url('../../assets/images/login/login_bg@3x.png');
background-size: cover;
input:-webkit-autofill { input:-webkit-autofill {
box-shadow: 0 0 0px 1000px #293444 inset !important; box-shadow: 0 0 0px 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important; -webkit-text-fill-color: #fff !important;
...@@ -122,7 +127,7 @@ $light_gray: #eee; ...@@ -122,7 +127,7 @@ $light_gray: #eee;
-webkit-appearance: none; -webkit-appearance: none;
border-radius: 0px; border-radius: 0px;
padding: 12px 5px 12px 15px; padding: 12px 5px 12px 15px;
color: $light_gray; color: #666;
height: 47px; height: 47px;
} }
.el-input { .el-input {
...@@ -146,25 +151,35 @@ $light_gray: #eee; ...@@ -146,25 +151,35 @@ $light_gray: #eee;
} }
} }
.title { .title {
font-size: 26px; font-size: 40px;
font-weight: 400;
color: $light_gray; color: $light_gray;
margin: 0px auto 40px auto; margin: 0px auto 70px auto;
text-align: center; text-align: center;
font-weight: bold; }
.login-form-wrpa {
width: 1290px;
height: 730px;
background: url('../../assets/images/login/login_screen_bg@3x.png') center
no-repeat;
margin: 100px auto 0;
position: relative;
} }
.login-form { .login-form {
position: absolute; position: absolute;
left: 0; top: 200px;
right: 0; right: 230px;
width: 400px; width: 336px;
padding: 35px 35px 15px 35px; }
margin: 120px auto; .loginFormItem {
height: 52px;
background-color: #fff;
border-radius: 8px;
margin-bottom: 28px;
} }
.el-form-item { .el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1); // background: rgba(0, 0, 0, 0.1);
border-radius: 5px; // border-radius: 5px;
color: #454545; color: #454545;
} }
.show-pwd { .show-pwd {
......
...@@ -53,7 +53,13 @@ const actions = { ...@@ -53,7 +53,13 @@ const actions = {
// 登出 // 登出
LogOut({ commit, state }) { LogOut({ commit, state }) {
return logout(state.token).then(() => { return logout(state.token)
.then(() => {
commit(SET_TOKEN, '');
removeToken();
})
.catch(err => {
console.log(err);
commit(SET_TOKEN, ''); commit(SET_TOKEN, '');
removeToken(); removeToken();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment