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 => {
});
// -2:其他客户端登录了;Token 过期了;
if (res.code === '-2') {
if (res.code === -2) {
if (logout) return;
logout = true;
MessageBox.confirm(
......
<template>
<div class="tab-container">
homePage
<img src="@/assets/images/request_timeout@3x.png" alt="">
</div>
</template>
......
<template>
<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">
<h3 class="title">{{title}}</h3>
<el-form-item prop="username">
<!-- <div class="title">{{title}}</div> -->
<div class="title">成师后勤管理系统</div>
<el-form-item class="loginFormItem" prop="username">
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" />
</el-form-item>
<el-form-item prop="password">
<el-form-item class="loginFormItem" prop="password">
<span class="svg-container">
<svg-icon icon-class="password"></svg-icon>
</span>
......@@ -28,6 +30,7 @@
</div> -->
</el-form>
</div>
</div>
</template>
<script>
......@@ -112,6 +115,8 @@ $light_gray: #eee;
height: 100%;
width: 100%;
background-color: $bg;
background-image: url('../../assets/images/login/login_bg@3x.png');
background-size: cover;
input:-webkit-autofill {
box-shadow: 0 0 0px 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important;
......@@ -122,7 +127,7 @@ $light_gray: #eee;
-webkit-appearance: none;
border-radius: 0px;
padding: 12px 5px 12px 15px;
color: $light_gray;
color: #666;
height: 47px;
}
.el-input {
......@@ -146,25 +151,35 @@ $light_gray: #eee;
}
}
.title {
font-size: 26px;
font-weight: 400;
font-size: 40px;
color: $light_gray;
margin: 0px auto 40px auto;
margin: 0px auto 70px auto;
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 {
position: absolute;
left: 0;
right: 0;
width: 400px;
padding: 35px 35px 15px 35px;
margin: 120px auto;
top: 200px;
right: 230px;
width: 336px;
}
.loginFormItem {
height: 52px;
background-color: #fff;
border-radius: 8px;
margin-bottom: 28px;
}
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border-radius: 5px;
// background: rgba(0, 0, 0, 0.1);
// border-radius: 5px;
color: #454545;
}
.show-pwd {
......
......@@ -53,7 +53,13 @@ const actions = {
// 登出
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, '');
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