From 797c99fd1e5f2ff9b2300134e9f6c71e3c421e9b Mon Sep 17 00:00:00 2001 From: xy <2115269706@qq.com> Date: Wed, 26 Mar 2025 09:16:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=A5=E8=AF=86=E7=82=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8F=B3=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 5 +++++ src/layout/knowledgePage.vue | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index 7381d99..0b83cd4 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -40,6 +40,11 @@ export const getKnowledgeService = () => { }); }; +// 下一个知识点给后台 +export const knowledgeCheckService = (id) => { + return request.get(`/pointrecords/xnPointRecords/check?id=${id}`) +} + //修改密码 export const userChangePasswordService = (params) => { return request.post('/xnRecords/changeStuPassword', params) diff --git a/src/layout/knowledgePage.vue b/src/layout/knowledgePage.vue index 83364d5..fb2c847 100644 --- a/src/layout/knowledgePage.vue +++ b/src/layout/knowledgePage.vue @@ -29,7 +29,7 @@ import settingStore from "@/store/modules/setting"; import { ref, computed, onMounted, } from "vue" import { ElMessage } from 'element-plus' -import { getKnowledgeService } from '@/api/user' +import { getKnowledgeService, knowledgeCheckService } from '@/api/user' import { useRouter } from 'vue-router'; const router = useRouter() const setting = settingStore(); @@ -47,8 +47,8 @@ const SubLeft = () => { const index = ref(0) //右箭头 // const activeData = ref({}) -const SubRight = () => { - +const SubRight = async() => { + await knowledgeCheckService(Knowledges.value[currentKnowledgeIndex.value].id) Knowledges.value[currentKnowledgeIndex.value].isStudy = true if (currentKnowledgeIndex.value + 1 < Knowledges.value.length) { currentKnowledgeIndex.value++; // 更新到下一题