Commit 8ce94856 authored by zhangyanni's avatar zhangyanni

退出依然记住密码

parent c5735d68
......@@ -573,4 +573,29 @@ i{
-moz-animation: fadeInOut 3s;
-ms-animation: fadeInOut 3s;
-o-animation: fadeInOut 3s;
}
//抽屉
.el-drawer.userInfo-drawer{
width: 20% !important;
& .el-drawer__header{
padding: 0;
}
& .el-drawer__body{
padding-top: 20px;
}
& .el-drawer__close-btn{
position: absolute;
padding: 0;
margin: 0;
top: 13px;
left: 20px;
}
& .basic-user-info{
&>img{
width: 60px;
height: 60px;
}
}
}
\ No newline at end of file
......@@ -34,6 +34,21 @@
<span @click="changeLangEvent()"><i :class="lang==='zh-CN'?'selectedLang':''">中文 / </i><i
:class="lang==='en'?'selectedLang':''">En</i></span>
</div>
<!--抽屉-->
<div class="drawer">
<el-drawer
custom-class="userInfo-drawer"
:visible.sync="drawer"
:direction="direction"
:before-close="handleClose">
<div class="basic-user-info">
<img src="../../assets/img/index/headerDefault.png" alt="">
<p>11111</p>
<p><span class="iconfont icon-vip"></span></p>
</div>
</el-drawer>
</div>
</div>
</template>
......@@ -68,7 +83,9 @@
}],
currentIndex: 0,
lang: navigator.language,
userInfo: null
userInfo: null,
drawer: false,
direction: 'rtl',
}
},
methods: {
......@@ -124,13 +141,23 @@
if (this.userInfo) {
if (this.userInfo.locked == 1) this.$router.push("/completeInfoCmpt");
}
console.log(this.userInfo);
},
handleLogout(){
window.localStorage.clear();
// this.drawer = true;
window.localStorage.removeItem("userInfo");
if (navigator.language == "zh-CN") this.$router.push("/mobileLoginCmpt");
else this.$router.push('/emailLoginCmpt');
},
handleClose(){
this.$confirm(this.$t("drawerInfo.closeTitle"))
.then(_ => {
done();
})
.catch(_ => {});
}
},
......
......@@ -77,7 +77,7 @@
activeName: "first",
codehtml: "getCode",
lang:navigator.language=="zh-CN"?1:2,
checked:false,
checked:window.localStorage.getItem("checked")=='true'?true:false,
emailForm: {
email: "",
password: "",
......@@ -194,6 +194,7 @@
//登录
handleLogin(type,formName){
const that =this;
window.localStorage.setItem("checked",this.checked);
if(this.flag==0){
this.flag++;
this.$refs[formName].validate((valid) => {
......
......@@ -78,7 +78,7 @@
activeName: "first",
codehtml: "getCode",
lang:navigator.language=="zh-CN"?1:2,
checked:false,
checked:window.localStorage.getItem("checked")=='true'?true:false,
loginForm: {
phone: "",
password: ""
......@@ -140,6 +140,7 @@
//登录
handleLogin(type, formName) {
const that =this;
window.localStorage.setItem("checked",this.checked);
this.$refs[formName].validate((valid) => {
if (valid) {
if(that.flag==0){
......
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