From 386a103df18dc869e7c37e3e6ff78eb08155d731 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 18 Dec 2025 15:36:33 +0800 Subject: [PATCH] fix --- src/store/index.ts | 6 +++++- src/views/HomeMain.vue | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/store/index.ts b/src/store/index.ts index 3c2d57ea..2f977725 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -13,7 +13,8 @@ export interface RootState{ export default createStore({ state: { - loading: true, + loading: false, + dataLoading: true, view_loading: false, }, getters: { @@ -25,6 +26,9 @@ export default createStore({ set_view_loading(state, v){ state.view_loading = v; }, + set_dataLoading(state, v){ + state.dataLoading = v; + }, }, actions: { }, diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue index 6847e4b1..834e2e0c 100644 --- a/src/views/HomeMain.vue +++ b/src/views/HomeMain.vue @@ -427,7 +427,7 @@
{{ $t('Header.pastDue') }}
-
+
- +
@@ -661,7 +661,7 @@ export default defineComponent({ }) let activeCredits = ref(false) - let loading = computed(() => (store.state.loading)) + let dataLoading = computed(() => (store.state.dataLoading)) let messageNum = computed(() => { return store.state.UserHabit.messageSystem.messageNum }) @@ -1075,7 +1075,7 @@ export default defineComponent({ isMurmur, credits, activeCredits, - loading, + dataLoading, messageNum, messageType, ...toRefs(stateList), @@ -1133,11 +1133,11 @@ export default defineComponent({ this.store .dispatch('getLangType') .then(() => { - this.store.commit('set_loading', false) + this.store.commit('set_dataLoading', false) resolve() }) .catch(() => { - this.store.commit('set_loading', false) + this.store.commit('set_dataLoading', false) reject() }) }) @@ -1339,7 +1339,7 @@ export default defineComponent({ }) }, setLang(v) { - this.store.commit('set_loading', true) + this.store.commit('set_dataLoading', true) Https.axiosGet(Https.httpUrls.changeUserLanguage, { params: { language: v } }) .then(rv => { if (rv) { @@ -1356,11 +1356,11 @@ export default defineComponent({ window.location.reload() // window.location.href = '/home'; } - this.store.commit('set_loading', false) + this.store.commit('set_dataLoading', false) } }) .catch(() => { - this.store.commit('set_loading', false) + this.store.commit('set_dataLoading', false) }) },