提交课程学习考试的修改

This commit is contained in:
daihh
2022-11-17 11:35:39 +08:00
parent 0bfde1fab1
commit 97ab1a7d72
3 changed files with 41 additions and 23 deletions

View File

@@ -3,10 +3,11 @@
<u-toast ref="messager"></u-toast>
<view v-if="has" class="paperinfo">
<view class="paperinfo-item">
<u-cell-group>
<u-cell title="考试时长" :value="info.testDuration+'分钟'"></u-cell>
<u-cell title="及格线" :value="info.passLine"></u-cell>
<u-cell v-if="studyItemId!=''" title="考试成绩" :value="lastScore"></u-cell>
<u-cell-group :border="false">
<u-cell :border="false" icon="/static/images/icon/exam-duration.png" title="考试时长" :value="info.testDuration+'分钟'"></u-cell>
<u-cell :border="false" icon="/static/images/icon/exam-times.png" title="考试次数" :value="info.times"></u-cell>
<u-cell :border="false" icon="/static/images/icon/exam-score.png" title="及格线" :value="info.passLine"></u-cell>
<u-cell :border="false" v-if="studyItemId!=''" title="考试成绩" :value="lastScore"></u-cell>
<!--应该再显示最终成绩最高一次或最后一次得分-->
</u-cell-group>
</view>
@@ -16,7 +17,7 @@
<!--考试记录-->
<view>
<view class="endurance" v-for="(item,idx) in records" :key="idx" @click="toExamDetail(item)">
<view class="exam">提交时间{{item.lastTime}}</view>
<view class="exam-time">提交时间{{item.lastTime}}</view>
<view class="endurance-cen">
<view>
<view style="display: flex;margin-top: 9px;">
@@ -28,6 +29,9 @@
<view class="patientlys" style="">{{item.testDuration}}</view>
</view>
</view>
<view>
<view class="endurance-btn"><text>查看试卷</text> </view>
</view>
</view>
</view>
</view>
@@ -83,6 +87,7 @@
},
mounted() {
this.loadExamInfo();
this.loadRecord();
},
watch:{
studyId(newVal){
@@ -163,12 +168,13 @@
}
.endurance{
height: 90px;
background: #FFFFFF;
background: #F9F9F9;
margin-top: 10px;
padding-bottom: 10px;
.exam{
.exam-time{
font-size: 15px;
color: #5EB6A4;
font-weight: Medium;
color: #333333;
padding-top: 15px;
margin-left: 15px;
}
@@ -177,7 +183,14 @@
display: flex;
justify-content: space-between;
margin-right: 11px;
.endurance-btn{
margin-top: 40upx;
background-color: #EAF1FF;
padding: 8upx 20upx;
color:#387DF7;
border-radius: 6upx;
font-size: 28upx;
}
.schedule{
font-size: 14px;
color: #868686;

View File

@@ -1,10 +1,12 @@
<template>
<view class="top">
<view v-show="showBack" class="back" @click="toBack()">
<view v-show="showBack" class="top-back" @click="toBack()">
<u-icon name="arrow-left"></u-icon>
</view>
<view><slot></slot> </view>
<view @click="topgae()" style="color: #387DF7;"><slot name="right"></slot> </view>
<view class="top-title"><slot></slot></view>
<view @click="topgae()" style="color: #387DF7;">
<slot name="right"></slot>
</view>
</view>
</template>
@@ -74,7 +76,7 @@
background-color: #fff;
display: flex;
justify-content: space-between;
.back{
.top-back{
// float: left;
color: #000;
padding-top:6px;
@@ -82,7 +84,7 @@
line-height: 40px;
// padding-left: 15px;
}
.title{
.top-title{
text-align: center;
font-size: 16px;
color: #000;

View File

@@ -285,15 +285,18 @@
},
confirmFinish(){
//这里应该是返回课程的页面
if(this.ctype==10){
uni.redirectTo({
url:'/pages/resource/microDetail?id='+this.info.courseId + '&exam=1'
})
}else if(this.ctype==20){
uni.redirectTo({
url:'/pages/study/onlineCourse?id='+this.info.courseId
})
}
uni.redirectTo({
url:'/pages/study/courseStudy?id='+this.info.courseId + '&contentId='+this.examId
})
// if(this.ctype==10){
// uni.redirectTo({
// url:'/pages/resource/microDetail?id='+this.info.courseId + '&exam=1'
// })
// }else if(this.ctype==20){
// uni.redirectTo({
// url:'/pages/study/onlineCourse?id='+this.info.courseId
// })
// }
}