fix: 退出登录清空浏览器历史栈,防止返回键回到游戏页面
This commit is contained in:
@@ -150,7 +150,11 @@ export default {
|
||||
},
|
||||
confirmLogout() {
|
||||
localStorage.removeItem("userInfo");
|
||||
this.$router.replace({ path: "/" });
|
||||
localStorage.removeItem("uni_id_token");
|
||||
sessionStorage.clear();
|
||||
const backSteps = window.history.length - 1;
|
||||
window.history.go(-backSteps);
|
||||
setTimeout(() => { window.location.replace("/"); }, 200);
|
||||
},
|
||||
getUserMoneyData() {
|
||||
var that = this
|
||||
|
||||
Reference in New Issue
Block a user