fix: 退出登录清空浏览器历史栈,防止返回键回到游戏页面

This commit is contained in:
testadmin
2026-05-13 13:49:47 +08:00
parent e8f0e2efbe
commit 31996b716f
+5 -1
View File
@@ -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