From 62896b197d7295da109a01446de30a9212c52cc0 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Thu, 19 Jun 2025 11:16:24 +0800 Subject: [PATCH] sc --- src/jtools/store/question.js | 8 ++++---- src/pages/index/components/Subject1.vue | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/jtools/store/question.js b/src/jtools/store/question.js index a14037f..d4874b8 100644 --- a/src/jtools/store/question.js +++ b/src/jtools/store/question.js @@ -72,10 +72,10 @@ const question = defineStore({ this.loading_subject1 = true; this.loadAllQuestion(url, 1); } else { - this.orderQuestion_subject4 = []; + this.orderQuestion_subject1 = []; for (let i = 0; i < JSON_SPLIT_LENGTH; i++) { - const arr = uni.getStorageSync(`question4Sub${i + 1}`) || []; - this.orderQuestion_subject4 = [...this.orderQuestion_subject4, ...arr]; + const arr = uni.getStorageSync(`question1Sub${i + 1}`) || []; + this.orderQuestion_subject1 = [...this.orderQuestion_subject1, ...arr]; } if (this.orderQuestion_subject1 && this.orderQuestion_subject1.length) { } else { @@ -92,7 +92,7 @@ const question = defineStore({ } else { this.orderQuestion_subject4 = []; for (let i = 0; i < JSON_SPLIT_LENGTH; i++) { - const arr = uni.getStorageSync(`question1Sub${i + 1}`) || []; + const arr = uni.getStorageSync(`question4Sub${i + 1}`) || []; this.orderQuestion_subject4 = [...this.orderQuestion_subject4, ...arr]; } if (this.orderQuestion_subject4 && this.orderQuestion_subject4.length) { diff --git a/src/pages/index/components/Subject1.vue b/src/pages/index/components/Subject1.vue index d35b7ef..fa70fa1 100644 --- a/src/pages/index/components/Subject1.vue +++ b/src/pages/index/components/Subject1.vue @@ -131,6 +131,9 @@ allQuestionNum: 0, } }, + mounted() { + this.getTitle() + }, onShow() { this.getTitle() },