From 1ba07f499a4e90886ca6ad1f87bce57415d7a2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 29 Jan 2026 14:55:17 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5Ffix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/components/todo-com/task.vue | 4 +- src/pages/index/components/todo.vue | 56 ++++++++++++++------ 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/pages/index/components/todo-com/task.vue b/src/pages/index/components/todo-com/task.vue index 7e19ae7a..20cb79aa 100644 --- a/src/pages/index/components/todo-com/task.vue +++ b/src/pages/index/components/todo-com/task.vue @@ -14,10 +14,10 @@ - + - {{32}}% + {{dataInfo.progress}}% 做任务 diff --git a/src/pages/index/components/todo.vue b/src/pages/index/components/todo.vue index 998e0b51..14291c24 100644 --- a/src/pages/index/components/todo.vue +++ b/src/pages/index/components/todo.vue @@ -9,7 +9,8 @@ - + + 暂无数据 点击加载更多 @@ -23,15 +24,11 @@ } from 'vue' import calendarCom from './calendar.vue' import todoItem from './todo-item.vue' - import { - queryHaveToDo - } from '@/api/index' import common from '@/common/common.js' - import { setPageCache } from '@/common/common'; + import { queryHaveToDo } from '@/api/index' import { startExamByCrs } from '@/api/examination.js'; - import { - checkTraPartnerInfoById - } from '@/api/sparring.js' + import { queryTestPapers } from '@/api/competition.js'; + import { checkTraPartnerInfoById } from '@/api/sparring.js' const activeDate = ref('') const tableData = ref([]) const pageObj = ref({ @@ -51,6 +48,7 @@ getDataList(activeDate.value) } const getDataList = (date, flag) => { + common.loading(); if(flag === 1){ tableData.value = [] pageObj.value = { @@ -59,17 +57,16 @@ limit: 999 } } - console.log('date: ' + date) - console.log(pageObj.value) queryHaveToDo({ date, ...pageObj.value }).then(res => { - console.log(res) let _arr = res.body || [] pageObj.value.totalNum = res.total tableData.value = tableData.value.concat(_arr) - }) + }).finally(() => { + common.hideLoading(); + }); } const handleDetail = (item) => { console.log(item) @@ -81,13 +78,13 @@ toSparringDetail(item) break; case '02': - common.navigateTo(`/pages/competition/matching?papersId=${item.papersId}&comId=${item.id}`); + toPKDetail(item) break; case '03': toExaminationDetail(item) break; case '04': - setPageCache('learning_tasks_details', { + common.setPageCache('learning_tasks_details', { ...item, taskId: item.id, taskName: item.name @@ -98,6 +95,26 @@ break; } } + // 去PK + const toPKDetail = async (item) => { + common.loading(); + queryTestPapers({ + comId: item.id + }) + .then((res) => { + common.setPageCache('competition_list', { + papersId: res.body.papersId, // 试卷id + isAnony: res.body.isAnony, // 是否匿名 Y是N否 + ruleDesc: res.body.ruleDesc, // 规则说明 + comName: item.name, // 标题 + comId: item.id + }); + common.navigateTo(`/pages/competition/matching?papersId=${res.body.papersId}&comId=${item.id}`); + }) + .finally(() => { + common.hideLoading(); + }); + }; // 去考试 const toExaminationDetail = async (item) => { common.loading(); @@ -105,7 +122,7 @@ crsId: item.id }) .then((res) => { - setPageCache('examination', { + common.setPageCache('examination', { ...res.body, name: item.name, crsId: item.id @@ -186,6 +203,9 @@ .table-list { padding: 16rpx; + .last-item{ + border-bottom: 0 !important; + } } .more-btn{ color: rgb(144, 147, 153); @@ -193,4 +213,10 @@ font-size: 23rpx; } } + .empty-box{ + text-align: center; + color: #999; + font-size: 24rpx; + line-height: 120rpx; + } \ No newline at end of file