Commit ec50e61c authored by wxk's avatar wxk

登录状态改为sessionStroge存储

parent fe6ad0aa
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
this.$router.push({ this.$router.push({
path: '/' path: '/'
}); });
localStorage["isLogin"] = false; sessionStorage.removeItem("isLogin");
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: "退出成功", message: "退出成功",
......
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
this.doAfterlogin(res); this.doAfterlogin(res);
localStorage["username"] = this.loginBody.email; localStorage["username"] = this.loginBody.email;
localStorage["isLogin"] = true; sessionStorage.setItem("isLogin",true);
}else{ }else{
this.$notify({ this.$notify({
title: '提示', title: '提示',
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}, },
created() { created() {
this.getPlatInfo(); this.getPlatInfo();
if (localStorage.getItem("isLogin")==='false') { if (!sessionStorage.getItem("isLogin")) {
this.$router.push({ this.$router.push({
path: '/' path: '/'
}); });
......
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
showDetails(index) { showDetails(index) {
this.robotDetails = true; this.robotDetails = true;
this.robotDetailInfo = this.robotList[index]; this.robotDetailInfo = this.robotList[index];
console.log(this.robotDetailInfo) // console.log(this.robotDetailInfo)
}, },
clickSwitch(val) { clickSwitch(val) {
const Tips = val ? '此操作将开启机器人, 是否继续?' : '此操作将关闭机器人, 是否继续?'; const Tips = val ? '此操作将开启机器人, 是否继续?' : '此操作将关闭机器人, 是否继续?';
......
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