提交
This commit is contained in:
@@ -7,9 +7,8 @@
|
||||
:class="tCurrent==item.value?'checked':'unchecked'" @tap="sectionChange(item.value)">{{item.label}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<swiper class="swiper mt20" :current="swiperIndex" :duration="duration" :autoplay="false"
|
||||
@change="onChange" @animationfinish="onAnimationfinish"
|
||||
@touchend="touchEnd">
|
||||
<swiper class="swiper mt20" :current="swiperIndex" :duration="duration" :autoplay="false" @change="onChange"
|
||||
@animationfinish="onAnimationfinish" @touchend="touchEnd">
|
||||
<swiper-item v-for="(quesItem,quesIndex) in swiperList" :key="quesIndex.questionId">
|
||||
<scroll-view scroll-y="true" class="swiper-scroll">
|
||||
<view>
|
||||
@@ -17,8 +16,10 @@
|
||||
<text class="tag_box">{{getQuestType(quesItem.type)}}</text>
|
||||
<text class="fs18" style="line-height: 42rpx;vertical-align: middle;">{{quesItem.question}}</text>
|
||||
</view>
|
||||
<view class="p14" v-if="quesItem.imageUrl">
|
||||
<image v-show="quesItem.imageUrl" style="width: 100%;height: auto;" mode="widthFix" :lazy-load="true" @load="onoff='1'" :src="quesItem.imageUrl"></image>
|
||||
<view class="p14 flex jc-c ai-c" v-if="quesItem.imageUrl">
|
||||
<image v-show="quesItem.imageUrl" style="width: auto;max-height:40vh;" mode="heightFix"
|
||||
:lazy-load="true" @load="onoff='1'" :src="quesItem.imageUrl" @click="preview(quesItem.imageUrl)">
|
||||
</image>
|
||||
</view>
|
||||
<template v-if="quesItem.type!='3'">
|
||||
<view class="flex m14lr ai-c mt20" v-for="(item,index) in quesItem.optionList" :key="item.op"
|
||||
@@ -41,7 +42,8 @@
|
||||
v-if="quesItem.clickAnswer&&!quesItem.trueAnswer.includes(quesItem.clickAnswer) || showBestAnswer">
|
||||
<view class="answer_box">
|
||||
<text class="fs18 fw600 cor-000">答案:{{getRightOp(quesItem.trueAnswer)}}</text>
|
||||
<view v-if="showSkillInfo==='show'&&quesItem.skillInfo" class="fs18 cor-000 mt5">答题技巧:{{quesItem.skillInfo}}</view>
|
||||
<view v-if="showSkillInfo==='show'&&quesItem.skillInfo" class="fs18 cor-000 mt5">
|
||||
答题技巧:{{quesItem.skillInfo}}</view>
|
||||
</view>
|
||||
<view class="flex ai-c jc-c mt10">
|
||||
<view style="height: 6rpx;width: 120rpx;background-color: rgb(232, 232, 232);"></view>
|
||||
@@ -50,7 +52,10 @@
|
||||
</view>
|
||||
<view class="mt10">
|
||||
<view class="fw600 cor-000 mb10 flex ai-c">
|
||||
<view style="background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%);height: 36rpx;width: 8rpx;" class="mr5"></view>题目解析</view>
|
||||
<view
|
||||
style="background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%);height: 36rpx;width: 8rpx;"
|
||||
class="mr5"></view>题目解析
|
||||
</view>
|
||||
<view style="text-indent:2em;">{{quesItem.bestAnswer}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,24 +97,29 @@
|
||||
<view class="m14lr mt30" v-if="isShowAnswer">
|
||||
<view class="answer_box">
|
||||
<text class="fs18 fw600 cor-000">答案:{{getRightOp(quesItem.trueAnswer)}}</text>
|
||||
<view v-if="showSkillInfo==='show'&&quesItem.skillInfo" class="fs18 cor-000"> 答题技巧:{{quesItem.skillInfo}}</view>
|
||||
</view>
|
||||
<view class="flex ai-c jc-c mt10">
|
||||
<view style="height: 6rpx;width: 120rpx;background-color: rgb(232, 232, 232);"></view>
|
||||
<view class="fs18 fw600 cor-000 p15lr">试题详解</view>
|
||||
<view style="height: 6rpx;width: 120rpx;background-color: rgb(232, 232, 232);"></view>
|
||||
</view>
|
||||
<view class="mt10">
|
||||
<view class="fw600 cor-000 mb10 flex ai-c">
|
||||
<view style="background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%);height: 36rpx;width: 8rpx;" class="mr5"></view>题目解析</view>
|
||||
<view style="text-indent:2em;">{{quesItem.bestAnswer}}</view>
|
||||
<view v-if="showSkillInfo==='show'&&quesItem.skillInfo" class="fs18 cor-000">
|
||||
答题技巧:{{quesItem.skillInfo}}</view>
|
||||
</view>
|
||||
<view class="flex ai-c jc-c mt10">
|
||||
<view style="height: 6rpx;width: 120rpx;background-color: rgb(232, 232, 232);"></view>
|
||||
<view class="fs18 fw600 cor-000 p15lr">试题详解</view>
|
||||
<view style="height: 6rpx;width: 120rpx;background-color: rgb(232, 232, 232);"></view>
|
||||
</view>
|
||||
<view class="mt10">
|
||||
<view class="fw600 cor-000 mb10 flex ai-c">
|
||||
<view
|
||||
style="background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%);height: 36rpx;width: 8rpx;"
|
||||
class="mr5"></view>题目解析
|
||||
</view>
|
||||
<view style="text-indent:2em;">{{quesItem.bestAnswer}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<q-previewImage ref="previewRef" :urls="imgs" @open="open"></q-previewImage>
|
||||
<view class="wp100 flex jc-sb ai-c p14 bc-fff" v-if="isShowAll" style="position: fixed;bottom: 0;left: 0;">
|
||||
<view style="width: 220rpx;">
|
||||
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
||||
@@ -232,8 +242,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex ai-c jc-fs p14" style="flex-wrap: wrap;max-height: 400px;overflow-y: scroll;">
|
||||
<view v-for="(item,index) of questionList" :key="item.questionId" style="width:20%;position: relative;" class="flex ai-c jc-c"
|
||||
@tap="chooseQueston(index)">
|
||||
<view v-for="(item,index) of questionList" :key="item.questionId" style="width:20%;position: relative;"
|
||||
class="flex ai-c jc-c" @tap="chooseQueston(index)">
|
||||
<view class="tCircle mb10" :class="{
|
||||
'active':index == topicIndex,
|
||||
'success':type=='exam'?rightList.includes(item.questionId):storageRightList.includes(item.questionId),
|
||||
@@ -241,8 +251,8 @@
|
||||
}">
|
||||
{{index+1}}
|
||||
</view>
|
||||
<u-icon name="star-fill" v-if="collectList.includes(item.questionId)" style="position: absolute;right: 5px;top:-3px"
|
||||
color="rgb(249,236,141)" size="24"></u-icon>
|
||||
<u-icon name="star-fill" v-if="collectList.includes(item.questionId)"
|
||||
style="position: absolute;right: 5px;top:-3px" color="rgb(249,236,141)" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -317,10 +327,11 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
subject:'1',
|
||||
showSkillInfo:'hidden',
|
||||
currentType:storage.get('carType') || '1001',
|
||||
onoff:'0',
|
||||
imgs: [],
|
||||
subject: '1',
|
||||
showSkillInfo: 'hidden',
|
||||
currentType: storage.get('carType') || '1001',
|
||||
onoff: '0',
|
||||
navTitle: '',
|
||||
originArray: '',
|
||||
showBestAnswer: false,
|
||||
@@ -333,7 +344,7 @@
|
||||
tCurrent: 0,
|
||||
index: 0,
|
||||
qIndex: 0,
|
||||
storageRightList:storage.get(`rightList_subject${this.subject}`) || [],
|
||||
storageRightList: storage.get(`rightList_subject${this.subject}`) || [],
|
||||
storageWrongList: storage.get(`wrongList_subject${this.subject}`) || [],
|
||||
rightList: [],
|
||||
wrongList: [],
|
||||
@@ -348,9 +359,9 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const carType=storage.get('carType') || '1001'
|
||||
querySysConfig(carType, 'NeedSkillInfo').then(resp=>{
|
||||
if(resp.code === '0000'){
|
||||
const carType = storage.get('carType') || '1001'
|
||||
querySysConfig(carType, 'NeedSkillInfo').then(resp => {
|
||||
if (resp.code === '0000') {
|
||||
this.showSkillInfo = resp.data.configValue
|
||||
}
|
||||
})
|
||||
@@ -377,12 +388,27 @@
|
||||
|
||||
},
|
||||
timeCount() {
|
||||
const time = 45 * 60 * 1000
|
||||
const time = 45 * 60 * 1000
|
||||
return time
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useQuestionStore, ['getCurrentIndex']),
|
||||
open() {
|
||||
|
||||
},
|
||||
preview(url) {
|
||||
this.imgs = [url] //设置图片数组
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$nextTick(() => {
|
||||
this.imgs = [url]
|
||||
setTimeout(()=>{
|
||||
this.$refs.previewRef.open(url);
|
||||
},500)
|
||||
})
|
||||
// #endif
|
||||
|
||||
},
|
||||
getOriginArr(val) {
|
||||
const arr = JSON.parse(val)
|
||||
let arr1 = []
|
||||
@@ -536,11 +562,11 @@
|
||||
toSubmit() {
|
||||
const restTime = this.time.hours * 60 * 60 + this.time.minutes * 60 + this.time.seconds
|
||||
const score = (this.rightList.length / this.questionList.length * 100).toFixed(0)
|
||||
if(this.rightList.length+this.wrongList.length==0){
|
||||
if (this.rightList.length + this.wrongList.length == 0) {
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
delta: 1
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
submitTest({
|
||||
"carTypeId": storage.get('carType') || '1001',
|
||||
"score": score,
|
||||
@@ -769,12 +795,12 @@
|
||||
if (title) {
|
||||
this.navTitle = title
|
||||
}
|
||||
if(subject){
|
||||
if (subject) {
|
||||
this.subject = subject
|
||||
console.log(this.subject);
|
||||
this.storageRightList=storage.get(`rightList_subject${subject}`) || []
|
||||
this.storageWrongList=storage.get(`wrongList_subject${subject}`) || []
|
||||
this.collectList=storage.get(`collectList_subject${subject}`) || []
|
||||
this.storageRightList = storage.get(`rightList_subject${subject}`) || []
|
||||
this.storageWrongList = storage.get(`wrongList_subject${subject}`) || []
|
||||
this.collectList = storage.get(`collectList_subject${subject}`) || []
|
||||
}
|
||||
if (val && val.length) {
|
||||
this.questionList = JSON.parse(val)
|
||||
@@ -783,12 +809,12 @@
|
||||
}
|
||||
console.log(this.questionList);
|
||||
if (this.navTitle === '顺序答题') {
|
||||
if(subject){
|
||||
if (subject) {
|
||||
this.pickerTopic(this[`currentIndex_subject${subject}`])
|
||||
}else{
|
||||
} else {
|
||||
this.pickerTopic(this[`currentIndex_subject${this.subject}`])
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
this.pickerTopic(this.topicIndex)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user