-- fix bug

This commit is contained in:
yuping
2023-02-18 01:40:57 +08:00
parent a27d7e0238
commit 5dc9c0ef0d

View File

@@ -335,7 +335,7 @@
{{item.name}}
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{tabValue==1?item.pointsCount:item.rateStr}}
{{tabValue==1?item?.pointsCount:item?.rateStr}}
</div>
</div>
@@ -369,10 +369,10 @@
style="width: 28px; height: 28px;border-radius: 28px;"
:src="tableRankData[myIndex-1]?.avatar"
/>
{{tableRankData[myIndex-1].name}}
{{tableRankData[myIndex-1]?.name}}
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{tabValue==1?tableRankData[myIndex-1].pointsCount:tableRankData[myIndex-1].rateStr}}
{{tabValue==1?tableRankData[myIndex-1]?.pointsCount:tableRankData[myIndex-1]?.rateStr}}
</div>
</div>
@@ -607,9 +607,10 @@ function judgeTaskIsEnd(type, endTimes, status) {
case 1:
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
case 3:
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
//案例么有时间限制
// case 3:
// status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
// break;
case 5:
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
@@ -623,7 +624,7 @@ function judgeTaskIsEnd(type, endTimes, status) {
return isEnd;
}
function toFinish(d, sName, chapterOrStageId) {
async function toFinish(d, sName, chapterOrStageId) {
console.log("dddddd", d, sName, chapterOrStageId);
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
ElMessage.error("当前任务已结束")
@@ -792,9 +793,9 @@ function toFinish(d, sName, chapterOrStageId) {
return;
}
//更新学员当前任务
request(UPDATE_CURRENT_TASK,{id:d.projectTaskId,type:PROJECT,pid:projectId,name:d.name})
await request(UPDATE_CURRENT_TASK, {id: d.projectTaskId, type: PROJECT, pid: projectId, name: d.name})
if (d.type == 3 || d.type == 7) {
d.status!==1 && request(STUDY_RECORD, {
d.status !== 1 && await request(STUDY_RECORD, {
studentId: userInfo.value.id,
targetId: data.value.routerId,
logo: PROJECT,