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">
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px" class="card-box login-form"> <div class="login-form-wrpa">
<h3 class="title">{{title}}</h3> <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px" class="card-box login-form">
<el-form-item prop="username"> <!-- <div class="title">{{title}}</div> -->
<span class="svg-container svg-container_login"> <div class="title">成师后勤管理系统</div>
<svg-icon icon-class="user" /> <el-form-item class="loginFormItem" prop="username">
</span> <span class="svg-container svg-container_login">
<el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" /> <svg-icon icon-class="user" />
</el-form-item> </span>
<el-form-item prop="password"> <el-input name="username" type="text" v-model="loginForm.name" autoComplete="on" placeholder="username" />
<span class="svg-container"> </el-form-item>
<svg-icon icon-class="password"></svg-icon> <el-form-item class="loginFormItem" prop="password">
</span> <span class="svg-container">
<el-input name="password" :type="pwdType" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on" placeholder="password"></el-input> <svg-icon icon-class="password"></svg-icon>
<span class="show-pwd" @click="showPwd"> </span>
<svg-icon icon-class="eye" /> <el-input name="password" :type="pwdType" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on" placeholder="password"></el-input>
</span> <span class="show-pwd" @click="showPwd">
</el-form-item> <svg-icon icon-class="eye" />
<el-form-item> </span>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin"> </el-form-item>
登录 <el-form-item>
</el-button> <el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
</el-form-item> 登录
<!-- <div class="tips"> </el-button>
</el-form-item>
<!-- <div class="tips">
<span style="margin-right:20px;">username: admin</span> <span style="margin-right:20px;">username: admin</span>
<span> password: admin</span> <span> password: admin</span>
</div> --> </div> -->
</el-form> </el-form>
</div>
</div> </div>
</template> </template>
...@@ -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,10 +53,16 @@ const actions = { ...@@ -53,10 +53,16 @@ const actions = {
// 登出 // 登出
LogOut({ commit, state }) { LogOut({ commit, state }) {
return logout(state.token).then(() => { return logout(state.token)
commit(SET_TOKEN, ''); .then(() => {
removeToken(); 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