Merge remote-tracking branch 'yx/20250821-hz' into 104-master-0626

This commit is contained in:
joshen
2025-09-11 11:01:27 +08:00
5 changed files with 463 additions and 402 deletions

View File

@@ -661,6 +661,7 @@ export default {
// 没有写播放时间 // 没有写播放时间
onPlayerPlay() { onPlayerPlay() {
console.log(`start play`)
this.playerBoxShow = false; this.playerBoxShow = false;
this.isAppendTime = true; this.isAppendTime = true;
this.appendStudyTime();//启动追加学习时长 this.appendStudyTime();//启动追加学习时长
@@ -849,7 +850,6 @@ export default {
$this.curContent = c; $this.curContent = c;
} }
}) })
} }
this.contentList = rs.result.contents;//内容列表 this.contentList = rs.result.contents;//内容列表
this.totalContent = rs.result.contents.length;//一共有向个可以播放的内容 this.totalContent = rs.result.contents.length;//一共有向个可以播放的内容
@@ -1540,16 +1540,20 @@ export default {
this.appendStartTime = new Date(); this.appendStartTime = new Date();
//console.log('开始追加学习时长',this.isAppendTime); //console.log('开始追加学习时长',this.isAppendTime);
if (this.studyId == '') { if (this.studyId == '') {
console.warn(`this.studyId == ''`, this.studyId)
return; return;
} }
if (!this.curContent.id) { if (!this.curContent.id) {
console.warn(`this.curContent.id`, this.studyId)
return; return;
} }
//清除之前的 //清除之前的
if (this.appendHandle != null) { if (this.appendHandle != null) {
console.warn(`timer clear`)
window.clearTimeout(this.appendHandle); window.clearTimeout(this.appendHandle);
} }
if (!this.isAppendTime) { if (!this.isAppendTime) {
console.warn(`this.isAppendTime` , false)
return; return;
} }
//启动下次追加学习时长 //启动下次追加学习时长

View File

@@ -5,7 +5,7 @@
<page-title :showBack="true">查看我的答卷</page-title> <page-title :showBack="true">查看我的答卷</page-title>
<view style="background-color: #FFFFFF;"> <view style="background-color: #FFFFFF;">
<u-cell-group> <u-cell-group>
<u-cell title="答卷时间" :value="lastTime"></u-cell> <u-cell title="答卷时间" :value="answerSurveyTime"></u-cell>
<u-cell title="答卷用时" :value="testDuration+'秒'"></u-cell> <u-cell title="答卷用时" :value="testDuration+'秒'"></u-cell>
<u-cell title="本次得分" :value="score"></u-cell> <u-cell title="本次得分" :value="score"></u-cell>
</u-cell-group> </u-cell-group>
@@ -18,7 +18,8 @@
<view>[{{ getTypeName(curItem.type) }}]{{ curItem.content }}</view> <view>[{{ getTypeName(curItem.type) }}]{{ curItem.content }}</view>
<view class="qimg" v-if="curItem.images"><img class="qimg-fit" :src="imageBaseUrl+curItem.images"/></view> <view class="qimg" v-if="curItem.images"><img class="qimg-fit" :src="imageBaseUrl+curItem.images"/></view>
</view> </view>
<view v-for="(opt,optIdx) in curItem.options" :key="optIdx" class="qitem-opt" :class="{'qitem-opt-user':userOptIdxs.indexOf(optIdx)>-1}"> <view v-for="(opt,optIdx) in curItem.options" :key="optIdx" class="qitem-opt"
:class="{'qitem-opt-user':userOptIdxs.indexOf(optIdx)>-1}">
<view> <view>
<view>{{ toLetter(optIdx + 1) }}, {{ opt.content }}</view> <view>{{ toLetter(optIdx + 1) }}, {{ opt.content }}</view>
<view v-if="opt.images" class="qimg"> <view v-if="opt.images" class="qimg">
@@ -26,8 +27,10 @@
</view> </view>
</view> </view>
<view> <view>
<text v-if="userOptIdxs.indexOf(optIdx)>-1 && correctOptIdxs.indexOf(optIdx)>-1" style="color: #00aa00; "></text> <text v-if="userOptIdxs.indexOf(optIdx)>-1 && correctOptIdxs.indexOf(optIdx)>-1" style="color: #00aa00; ">
<text v-if="userOptIdxs.indexOf(optIdx)>-1 && correctOptIdxs.indexOf(optIdx)==-1" style="color: #ff0000; ">×</text> </text>
<text v-if="userOptIdxs.indexOf(optIdx)>-1 && correctOptIdxs.indexOf(optIdx)==-1" style="color: #ff0000; ">×
</text>
</view> </view>
</view> </view>
</view> </view>
@@ -56,7 +59,8 @@
<view class="analysis-con">联言判断就是断定集中事物情况同时存在的判断,因此该判断属于联言判断,答案为A</view> --> <view class="analysis-con">联言判断就是断定集中事物情况同时存在的判断,因此该判断属于联言判断,答案为A</view> -->
<view class="bottom-btns"> <view class="bottom-btns">
<u-button type="info" text="上一题" @click="prevSub" class="next" :disabled="this.curIndex<1"></u-button> <u-button type="info" text="上一题" @click="prevSub" class="next" :disabled="this.curIndex<1"></u-button>
<u-button type="info" text="下一题" @click="nextSub" class="next" :disabled="this.curIndex>=(this.total-1)"></u-button> <u-button type="info" text="下一题" @click="nextSub" class="next"
:disabled="this.curIndex>=(this.total-1)"></u-button>
</view> </view>
</view> </view>
</template> </template>
@@ -65,6 +69,7 @@
import config from '@/config/index.js' import config from '@/config/index.js'
import apiCourseStudy from '@/api/modules/courseStudy.js' import apiCourseStudy from '@/api/modules/courseStudy.js'
import {formatDate, getQuestionType, correctJudgment, numberToLetter} from '@/utils/tools.js'; import {formatDate, getQuestionType, correctJudgment, numberToLetter} from '@/utils/tools.js';
export default { export default {
data() { data() {
return { return {
@@ -90,6 +95,14 @@
userOptIdxs: [],//用户的答案 userOptIdxs: [],//用户的答案
} }
}, },
computed: {
answerSurveyTime() {
console.log(`answer time: ` , this.lastTime)
if (!this.lastTime.length) return "Error Date"
const [y, m, d, h, min, s] = this.lastTime
return `${y}${m}${d}${h}:${min}:${s}`
}
},
onLoad(options) { onLoad(options) {
//如果id不存在应该返回错误页面 //如果id不存在应该返回错误页面
this.recordId = options.id;//当前考试记录的id this.recordId = options.id;//当前考试记录的id
@@ -179,11 +192,14 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.qitem { .qitem {
padding: 20upx 40upx; padding: 20upx 40upx;
.qitem-content { .qitem-content {
padding: 20upx 0upx; padding: 20upx 0upx;
} }
.qitem-opt { .qitem-opt {
margin-bottom: 20upx; margin-bottom: 20upx;
min-height: 50upx; min-height: 50upx;
@@ -193,25 +209,31 @@
justify-content: space-between; justify-content: space-between;
padding: 30upx 20upx; padding: 30upx 20upx;
} }
.qitem-opt-user { .qitem-opt-user {
background-color: #fff3e5; background-color: #fff3e5;
} }
.qitem-opt-correct { .qitem-opt-correct {
background-color: #5BA2FC; background-color: #5BA2FC;
color: #FFFFFF; color: #FFFFFF;
} }
.qitem-opt-wrong { .qitem-opt-wrong {
background-color: #EF826B; background-color: #EF826B;
color: #FFFFFF; color: #FFFFFF;
} }
} }
.ed-top { .ed-top {
display: flex; display: flex;
.preface { .preface {
color: #D5D5D5; color: #D5D5D5;
margin-left: 16px; margin-left: 16px;
margin-top: 19px; margin-top: 19px;
} }
.mold { .mold {
font-size: 12px; font-size: 12px;
color: #C1C1C1; color: #C1C1C1;
@@ -219,12 +241,14 @@
margin-left: 5px; margin-left: 5px;
} }
} }
.ed-center { .ed-center {
.topic { .topic {
color: #2E2E2E; color: #2E2E2E;
margin-left: 16px; margin-left: 16px;
margin-top: 10px; margin-top: 10px;
} }
.topic-center { .topic-center {
&-1 { &-1 {
width: 344px; width: 344px;
@@ -235,22 +259,26 @@
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.topic_left { .topic_left {
line-height: 64px; line-height: 64px;
margin-left: 16px; margin-left: 16px;
color: #FFFFFF; color: #FFFFFF;
display: flex; display: flex;
.liany { .liany {
font-size: 12px; font-size: 12px;
margin-left: 5px; margin-left: 5px;
} }
} }
.topic_right { .topic_right {
color: #FFFFFF; color: #FFFFFF;
line-height: 64px; line-height: 64px;
margin-right: 13px; margin-right: 13px;
} }
} }
&-2 { &-2 {
width: 344px; width: 344px;
height: 64px; height: 64px;
@@ -260,22 +288,26 @@
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.topic_left { .topic_left {
line-height: 64px; line-height: 64px;
margin-left: 16px; margin-left: 16px;
color: #FFFFFF; color: #FFFFFF;
display: flex; display: flex;
.liany { .liany {
font-size: 12px; font-size: 12px;
margin-left: 5px; margin-left: 5px;
} }
} }
.topic_right { .topic_right {
color: #FFFFFF; color: #FFFFFF;
line-height: 64px; line-height: 64px;
margin-right: 13px; margin-right: 13px;
} }
} }
&-3 { &-3 {
width: 344px; width: 344px;
height: 64px; height: 64px;
@@ -285,22 +317,26 @@
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.topic_left { .topic_left {
line-height: 64px; line-height: 64px;
margin-left: 16px; margin-left: 16px;
color: #000000; color: #000000;
display: flex; display: flex;
.liany { .liany {
font-size: 12px; font-size: 12px;
margin-left: 5px; margin-left: 5px;
} }
} }
.topic_right { .topic_right {
color: #000000; color: #000000;
line-height: 64px; line-height: 64px;
margin-right: 13px; margin-right: 13px;
} }
} }
&-4 { &-4 {
width: 344px; width: 344px;
height: 64px; height: 64px;
@@ -310,16 +346,19 @@
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.topic_left { .topic_left {
line-height: 64px; line-height: 64px;
margin-left: 16px; margin-left: 16px;
color: #000000; color: #000000;
display: flex; display: flex;
.liany { .liany {
font-size: 12px; font-size: 12px;
margin-left: 5px; margin-left: 5px;
} }
} }
.topic_right { .topic_right {
color: #000000; color: #000000;
line-height: 64px; line-height: 64px;
@@ -329,49 +368,59 @@
} }
} }
.tit { .tit {
color: #333333; color: #333333;
margin-left: 14px; margin-left: 14px;
margin-top: 38px; margin-top: 38px;
} }
.answer { .answer {
width: 346px; width: 346px;
height: 112px; height: 112px;
background: #FFFFFF; background: #FFFFFF;
margin-left: 14px; margin-left: 14px;
margin-top: 18px; margin-top: 18px;
.result { .result {
font-size: 12px; font-size: 12px;
color: #EF826B; color: #EF826B;
padding-left: 20px; padding-left: 20px;
padding-top: 10px; padding-top: 10px;
} }
.wrought { .wrought {
display: flex; display: flex;
.correct-response { .correct-response {
width: 87px; width: 87px;
height: 70px; height: 70px;
.response-tit { .response-tit {
font-size: 14px; font-size: 14px;
color: #B3B3B3; color: #B3B3B3;
text-align: center; text-align: center;
padding-top: 10px; padding-top: 10px;
} }
.response-sels { .response-sels {
color: #5B5B5B; color: #5B5B5B;
text-align: center; text-align: center;
padding-top: 8px; padding-top: 8px;
} }
} }
.wrong-response { .wrong-response {
width: 87px; width: 87px;
height: 70px; height: 70px;
.wrong-tit { .wrong-tit {
font-size: 14px; font-size: 14px;
color: #B3B3B3; color: #B3B3B3;
text-align: center; text-align: center;
padding-top: 10px; padding-top: 10px;
} }
.wrong-sels { .wrong-sels {
color: #5B5B5B; color: #5B5B5B;
text-align: center; text-align: center;
@@ -380,18 +429,21 @@
} }
} }
} }
.analysis { .analysis {
font-size: 14px; font-size: 14px;
color: #D3D3D3; color: #D3D3D3;
margin-left: 14px; margin-left: 14px;
margin-top: 20px; margin-top: 20px;
} }
.analysis-con { .analysis-con {
font-size: 12px; font-size: 12px;
color: #000000; color: #000000;
margin-left: 14px; margin-left: 14px;
margin-top: 10px; margin-top: 10px;
} }
.question { .question {
height: 52px; height: 52px;
background: #EF826B; background: #EF826B;
@@ -400,10 +452,12 @@
text-align: center; text-align: center;
line-height: 52px; line-height: 52px;
} }
.qimg { .qimg {
//padding-left: 30px; //padding-left: 30px;
width: 100%; width: 100%;
text-align: left; text-align: left;
.qimg-fit { .qimg-fit {
width: 100%; width: 100%;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long