From 3961638804b2b6b1ddae2ac694a56fa0dd387b93 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 17 May 2024 20:02:32 +0800 Subject: [PATCH] fix --- src/views/HomeView/HomeView.vue | 2 +- src/views/LoginPage.vue | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/HomeView/HomeView.vue b/src/views/HomeView/HomeView.vue index 929db62a..50febce2 100644 --- a/src/views/HomeView/HomeView.vue +++ b/src/views/HomeView/HomeView.vue @@ -441,7 +441,6 @@ export default defineComponent({ let noRefresh = this.$route.params.noRefresh; //判断是否主动刷新还是路由跳转过来的 true 路由跳转过来的 window.addEventListener('beforeunload', (event)=>{ - this.store.commit("setUserGroupId", this.$route.params.id); this.store.commit("clearAllCollection"); }); if (this.$route.name == "homePage") { @@ -892,6 +891,7 @@ export default defineComponent({ Https.httpUrls.historyChoose + `?userGroupId=${userGroupId}`; Https.axiosGet(url) .then((rv: any) => { + this.store.commit("setUserGroupId", rv.userGroupId); this.dealHistoryChooseData(rv, type); this.isShowMark = false; }) diff --git a/src/views/LoginPage.vue b/src/views/LoginPage.vue index cc0119da..0ca19b7c 100644 --- a/src/views/LoginPage.vue +++ b/src/views/LoginPage.vue @@ -527,6 +527,8 @@ export default defineComponent({ // this.$router.push("/home"); // console.log(window.location.search.substring(1)); this.store.commit("clearAllData"); + this.store.commit("clearAllCollection"); + this.store.commit("setAllBoardDataChoose",{}); this.$router.push("/home"); }, //获取当前语言