2608e4ea by joe

1

1 parent 5679a14f
......@@ -141,6 +141,7 @@ export default {
}
},
logoutHandler() {
this.clearCache();
httpPost({
url: api.logout
}).then(() => {
......@@ -148,6 +149,13 @@ export default {
this.showLogoutTip();
});
},
clearCache() {
for (let index = 0; index < sessionStorage.length; index++) {
let key = sessionStorage.key(index);
console.log(key);
sessionStorage.removeItem(key);
}
},
showLogoutTip() {
// 登出后的提示
// alert("登出成功");
......
......@@ -95,6 +95,7 @@ export default {
}
},
logoutHandler() {
console.log("logoutHandler");
this.clearCache();
httpPost({
url: api.logout
......@@ -106,6 +107,7 @@ export default {
clearCache() {
for (let index = 0; index < sessionStorage.length; index++) {
let key = sessionStorage.key(index);
console.log(key);
sessionStorage.removeItem(key);
}
},
......