diff --git a/src/pages/index/components/todo.vue b/src/pages/index/components/todo.vue
index 14291c24..7bc30bc6 100644
--- a/src/pages/index/components/todo.vue
+++ b/src/pages/index/components/todo.vue
@@ -9,7 +9,8 @@
-
+
暂无数据
点击加载更多
@@ -25,10 +26,18 @@
import calendarCom from './calendar.vue'
import todoItem from './todo-item.vue'
import common from '@/common/common.js'
- import { queryHaveToDo } from '@/api/index'
- import { startExamByCrs } from '@/api/examination.js';
- import { queryTestPapers } from '@/api/competition.js';
- import { checkTraPartnerInfoById } from '@/api/sparring.js'
+ import {
+ queryHaveToDo
+ } from '@/api/index'
+ import {
+ queryTraExamPapersByPapersId
+ } from '@/api/examination.js';
+ import {
+ queryTestPapers
+ } from '@/api/competition.js';
+ import {
+ checkTraPartnerInfoById
+ } from '@/api/sparring.js'
const activeDate = ref('')
const tableData = ref([])
const pageObj = ref({
@@ -49,12 +58,12 @@
}
const getDataList = (date, flag) => {
common.loading();
- if(flag === 1){
+ if (flag === 1) {
tableData.value = []
pageObj.value = {
totalNum: 0,
page: 1,
- limit: 999
+ limit: 10
}
}
queryHaveToDo({
@@ -73,16 +82,16 @@
switch (item.type) {
case '00':
common.navigateTo('/pages/courseDetail/index?crsId=' + item.id)
- break;
+ break;
case '01':
toSparringDetail(item)
- break;
+ break;
case '02':
toPKDetail(item)
- break;
+ break;
case '03':
toExaminationDetail(item)
- break;
+ break;
case '04':
common.setPageCache('learning_tasks_details', {
...item,
@@ -90,17 +99,17 @@
taskName: item.name
});
common.navigateTo('/pages/learningTasks/details?taskId=' + item.id);
- break;
+ break;
default:
- break;
+ break;
}
}
// 去PK
const toPKDetail = async (item) => {
common.loading();
queryTestPapers({
- comId: item.id
- })
+ comId: item.id
+ })
.then((res) => {
common.setPageCache('competition_list', {
papersId: res.body.papersId, // 试卷id
@@ -118,17 +127,14 @@
// 去考试
const toExaminationDetail = async (item) => {
common.loading();
- startExamByCrs({
- crsId: item.id
- })
- .then((res) => {
- common.setPageCache('examination', {
- ...res.body,
- name: item.name,
- crsId: item.id
- });
- common.navigateTo('/pages/examination/index');
+ queryTraExamPapersByPapersId({
+ papersId: item.id
})
+ .then((res) => {
+ common.setPageCache('testing_hall_details',res.body);
+ common.navigateTo('/pages/testingHall/details');
+ })
+ .catch(() => {})
.finally(() => {
common.hideLoading();
});
@@ -203,17 +209,20 @@
.table-list {
padding: 16rpx;
- .last-item{
+
+ .last-item {
border-bottom: 0 !important;
}
}
- .more-btn{
+
+ .more-btn {
color: rgb(144, 147, 153);
text-align: center;
font-size: 23rpx;
}
}
- .empty-box{
+
+ .empty-box {
text-align: center;
color: #999;
font-size: 24rpx;