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);