Commit ec50e61c authored by wxk's avatar wxk

登录状态改为sessionStroge存储

parent fe6ad0aa
......@@ -21,7 +21,7 @@
this.$router.push({
path: '/'
});
localStorage["isLogin"] = false;
sessionStorage.removeItem("isLogin");
this.$notify({
title: '提示',
message: "退出成功",
......
......@@ -321,7 +321,7 @@ export default {
this.doAfterlogin(res);
localStorage["username"] = this.loginBody.email;
localStorage["isLogin"] = true;
sessionStorage.setItem("isLogin",true);
}else{
this.$notify({
title: '提示',
......
......@@ -48,7 +48,7 @@
},
created() {
this.getPlatInfo();
if (localStorage.getItem("isLogin")==='false') {
if (!sessionStorage.getItem("isLogin")) {
this.$router.push({
path: '/'
});
......
......@@ -359,7 +359,7 @@
showDetails(index) {
this.robotDetails = true;
this.robotDetailInfo = this.robotList[index];
console.log(this.robotDetailInfo)
// console.log(this.robotDetailInfo)
},
clickSwitch(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