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