Commit a54e2b21 authored by wxk's avatar wxk

检测登录

parent c4ad0ff5
......@@ -21,6 +21,7 @@
this.$router.push({
path: '/'
});
localStorage["isLogin"] = false;
this.$notify({
title: '提示',
message: "退出成功",
......
......@@ -20,7 +20,7 @@
<span @click="goShowPanel(3)" class="bluepoint">找回密码</span>
</span>
<input type="checkbox" name="记住用户密码" class="rember" v-model="isSaveLoginInfo">
<span>记住用户名</span>
<span>记住密码</span>
</div>
<el-button type="primary" class="loginget" @click="Login">立刻登录</el-button>
</div>
......@@ -46,7 +46,7 @@
<input type="text" placeholder="请输入验证码" class="usercomyzm" v-model="regist_yzm">
<el-button type="primary" class="getyzm" @click="getYZM('regist')" :disabled='!show'>
<span v-show = "show">获取验证码</span>
<span v-show = "!show" class="count">还剩下{{count}} s</span>
<span v-show = "!show" class="count">已发送{{count}} s</span>
</el-button>
</div>
<div class="ground" style="margin-bottom:70px;">
......@@ -71,7 +71,7 @@
<input type="text" placeholder="请输入验证码" class="usercomyzm" v-model="forget_yzm">
<el-button type="primary" class="getyzm" @click="getYZM('forgetpassword')" :disabled='!show'>
<span v-show = "show">获取验证码</span>
<span v-show = "!show" class="count">还剩下{{count}} s</span>
<span v-show = "!show" class="count">已发送{{count}} s</span>
</el-button>
</div>
<div class="groupcom inputpwd">
......@@ -319,8 +319,9 @@ export default {
path:'/monitor'
})
this.doAfterlogin(res)
this.doAfterlogin(res);
localStorage["username"] = this.loginBody.email;
localStorage["isLogin"] = true;
}else{
this.$notify({
title: '提示',
......
......@@ -48,6 +48,11 @@
},
created() {
this.getPlatInfo();
if (localStorage.getItem("isLogin")==='false') {
this.$router.push({
path: '/'
});
}
},
methods: {
getPlatInfo() {
......
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