From 66b7fbc691be54ffd6e5e62bf02baa7814190303 Mon Sep 17 00:00:00 2001 From: JayChou Date: Tue, 1 Apr 2025 15:00:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9F=A5=E8=AF=86=E7=82=B9?= =?UTF-8?q?=E5=9C=A8=E7=AC=AC=E5=85=AD=E9=A2=98=E8=BF=98=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8F=B3=E4=BE=A7=E7=AE=AD=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/knowledgePage.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layout/knowledgePage.vue b/src/layout/knowledgePage.vue index 1f57c29..94c2340 100644 --- a/src/layout/knowledgePage.vue +++ b/src/layout/knowledgePage.vue @@ -48,8 +48,8 @@ const index = ref(0) //右箭头 // const activeData = ref({}) const SubRight = async() => { - await knowledgeCheckService(Knowledges.value[currentKnowledgeIndex.value].id) - Knowledges.value[currentKnowledgeIndex.value].isStudy = true + await knowledgeCheckService(Knowledges.value[currentKnowledgeIndex.value + 1].id) + Knowledges.value[currentKnowledgeIndex.value + 1].isStudy = true if (currentKnowledgeIndex.value + 1 < Knowledges.value.length) { currentKnowledgeIndex.value++; // 更新到下一题 @@ -68,6 +68,10 @@ const getKnowledge = async () => { Knowledges.value = res.result.kpVlist // isStudy.value = Knowledges.value[currentKnowledgeIndex.value].isStudy console.log(Knowledges.value, 'ress') + await knowledgeCheckService(Knowledges.value[currentKnowledgeIndex.value].id) + Knowledges.value[currentKnowledgeIndex.value].isStudy = true + isStudy.value = true + } // 当前题目的索引 const currentKnowledgeIndex = ref(0);