Commit 97bd3358 authored by 华国豪's avatar 华国豪 🙄

登录页面新增记住密码

parent b66032e8
......@@ -109,7 +109,8 @@
.login-box .forgetPw{
/* width:300px; */
height:40px;
text-align: right;
display: flex;
justify-content: space-between;
margin:auto;
color:#999999;
font-size:12px;
......
......@@ -48,6 +48,7 @@
<img style="width: 40px;" src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<p class="FPF_b">{{groupModel.GroupName?groupModel.GroupName:''}}</p>
</div>
<div class="sumMainTitle FPF_s">登录</div>
<div class="login-commonBotm">
<i class="icon-login-name iconfont icon-user11" :style="{color: name_bline==true?'#E95252':'#000000'}"></i>
......@@ -60,6 +61,8 @@
</div>
<div class="login-commonBotm">
<i class="icon-login-password iconfont icon-mima" :style="{color: pwd_bline==true?'#E95252':'#000000'}"></i>
<input type="text" name="text" autocomplete="on" style="width:0;height:0;position: absolute;z-index: -999;">
<input type="password" name="password" autocomplete="on" style="width:0;height:0;position: absolute;z-index: -999;">
<input class="input FPF_b" @focus="pwd_bline=true" @blur="pwd_bline=false" maxlength="20" autocomplete="new-password" v-model="userInfo.password" style="background-color:transparent !important" type="password" :placeholder="$t('login.login_password')" @keyup.enter="doLogin"/>
<div class="pwd_bline_left" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
......@@ -71,6 +74,9 @@
<button type="button" class="sLoginBtn FPF_s" :class="{'loginIng':loginState==1}" :disabled="loginState==1" @click="doLogin">{{loginState==1?'登录中...':'登录'}}</button>
</div>
<div class="forgetPw">
<div>
<el-checkbox v-model="checkedAotu">下次自动登录</el-checkbox>
</div>
<span @click="updatePwd">{{$t('login.login_forgetpwd')}}?</span>
</div>
<!-- <div class="login-way">
......@@ -191,7 +197,7 @@ export default {
userInfo: {
name: "",
password: "",
Domain:""
Domain:""
},
groupModel:"",
password: "",
......@@ -215,6 +221,7 @@ export default {
height:0,
clock:null,
crtIndex:0,
checkedAotu: false,
}
},components:{
'my-carousel': Carousel
......@@ -223,8 +230,8 @@ export default {
initData() {
//判断是否是线上环境
if (!this.isOnline()) {
this.userInfo.name = "18117845617";
this.userInfo.password = "123456";
// this.userInfo.name = "18117845617";
// this.userInfo.password = "123456";
}
this.userInfo.Domain =window.location.hostname
},
......@@ -264,6 +271,11 @@ export default {
this.isShow = 2;
} else if (jsonData.resultCode == 1) {
//登录成功
let autoLogin = this.checkedAotu ? {
acc: this.userInfo.name,
pwd: this.userInfo.password,
} : null ;
localStorage.autoLogin = JSON.stringify(autoLogin)
var userData = jsonData.data;
var userJson = JSON.stringify(userData);
localStorage.removeItem('navTabs')
......@@ -435,7 +447,10 @@ export default {
this.initData()
this.getGroup()
},created(){
let autoLogin = localStorage.autoLogin ? JSON.parse(localStorage.autoLogin) : null
this.userInfo.name = autoLogin ? autoLogin.acc : ''
this.userInfo.password = autoLogin ? autoLogin.pwd : ''
this.checkedAotu = autoLogin ? true : false
}
}
</script>
\ No newline at end of file
......@@ -279,7 +279,7 @@ export default {
},
handleCurrentChange(val) { //翻页
this.msg.pageIndex = val;
this.getPageList();
this.getList();
},
resetPageIndex(){ // 重置页码
this.msg.pageIndex=1;
......
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