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++; // 更新到下一题