bug修复
This commit is contained in:
parent
6fc771028d
commit
3f5dee3100
|
|
@ -725,14 +725,17 @@ export default {
|
||||||
.options {
|
.options {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
|
max-height: 330px;
|
||||||
|
overflow: auto;
|
||||||
.option-wrapper {
|
.option-wrapper {
|
||||||
max-height: 500px;
|
max-height: 200px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.option {
|
.option {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
margin-bottom: 5px;
|
||||||
background: #f4f9fe;
|
background: #f4f9fe;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
&.isActive {
|
&.isActive {
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wrapper {
|
.wrapper {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: url('/static/images/examine-detail-bg.png') no-repeat;
|
background: url(require('/static/images/examine-detail-bg.png')) no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -249,7 +249,7 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 180.5px;
|
width: 180.5px;
|
||||||
height: 118.6px;
|
height: 118.6px;
|
||||||
background: url('/static/images/result-bg.png') no-repeat;
|
background: url(require('/static/images/result-bg.png')) no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<div class="content">
|
<div class="content" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd">
|
||||||
<div class="top-content">
|
<div class="top-content">
|
||||||
<div class="top-wrapper">
|
<div class="top-wrapper">
|
||||||
<div class="all" :class="{ isAllActive: isActive !== 1 }" @click="handleTab(1)">全部</div>
|
<div class="all" :class="{ isAllActive: isActive !== 1 }" @click="handleTab(1)">全部</div>
|
||||||
|
|
@ -50,14 +50,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="question">{{ currentIndex + 1 }}. {{ item.examTopic }}</div>
|
<div class="question">{{ currentIndex + 1 }}. {{ item.examTopic }}</div>
|
||||||
|
<u-image
|
||||||
|
v-if="item.examTopicUrl"
|
||||||
|
:showLoading="true"
|
||||||
|
:src="fileUrl + item.examTopicUrl || ''"
|
||||||
|
width="60px"
|
||||||
|
height="60px"
|
||||||
|
style="margin-bottom: 10px"
|
||||||
|
@click="clickImg(fileUrl + item.examTopicUrl)"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<div
|
<div class="option-wrapper" v-for="(option, optionIndex) in item.listOption" :key="optionIndex">
|
||||||
class="option"
|
<div class="option" :class="{ isRight: option.isRight, isError: option.isError }">
|
||||||
v-for="(option, optionIndex) in item.listOption"
|
|
||||||
:key="optionIndex"
|
|
||||||
:class="{ isRight: option.isRight, isError: option.isError }"
|
|
||||||
>
|
|
||||||
<div class="option-item">{{ option.optionIdent }}.</div>
|
<div class="option-item">{{ option.optionIdent }}.</div>
|
||||||
<div class="option-content">
|
<div class="option-content">
|
||||||
<div>{{ option.optionContent }}</div>
|
<div>{{ option.optionContent }}</div>
|
||||||
|
|
@ -65,6 +70,16 @@
|
||||||
<u-icon v-if="option.isError" name="/static/images/error.png" />
|
<u-icon v-if="option.isError" name="/static/images/error.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<u--image
|
||||||
|
v-if="option.optionUrl"
|
||||||
|
:showLoading="true"
|
||||||
|
:src="fileUrl + option.optionUrl || ''"
|
||||||
|
width="60px"
|
||||||
|
height="60px"
|
||||||
|
style="margin-bottom: 10px"
|
||||||
|
@click="clickImg(fileUrl + option.optionUrl)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -143,325 +158,15 @@ export default {
|
||||||
unAnsweredCount: 0,
|
unAnsweredCount: 0,
|
||||||
// 问题列表
|
// 问题列表
|
||||||
questionList: [],
|
questionList: [],
|
||||||
// questionList: [
|
fileUrl: config.fileUrl,
|
||||||
// {
|
|
||||||
// type: 1,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: 'A',
|
|
||||||
// selectAnswer: 'B',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 2,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: ['B', 'D'],
|
|
||||||
// selectAnswer: ['B', 'C'],
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 3,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '对',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '错',
|
|
||||||
// value: 'B'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: 'A',
|
|
||||||
// selectAnswer: 'A',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 1,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: 'A',
|
|
||||||
// userAnswer: 'A',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 2,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: ['B', 'D'],
|
|
||||||
// userAnswer: ['B', 'C'],
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 2,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: ['B', 'D'],
|
|
||||||
// userAnswer: ['B', 'D'],
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 3,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '对',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '错',
|
|
||||||
// value: 'B'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: 'A',
|
|
||||||
// userAnswer: 'A',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 1,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// rightAnswer: 'A',
|
|
||||||
// userAnswer: 'B',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 2,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// rightAnswer: ['B', 'D'],
|
|
||||||
// userAnswer: ['B', 'C'],
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 3,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '对',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '错',
|
|
||||||
// value: 'B'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// rightAnswer: 'A',
|
|
||||||
// userAnswer: 'A',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 1,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// rightAnswer: 'A',
|
|
||||||
// userAnswer: 'B',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 2,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '正常工作电压作用下的电气设备',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'B'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'C'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '电气设备的绝缘电阻',
|
|
||||||
// value: 'D'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// rightAnswer: ['B', 'D'],
|
|
||||||
// userAnswer: ['B', 'C'],
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 3,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '对',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '错',
|
|
||||||
// value: 'B'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// rightAnswer: 'A',
|
|
||||||
// userAnswer: 'A',
|
|
||||||
// analysis: '解析'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 3,
|
|
||||||
// question: '送配电线路架设工模拟考试',
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '对',
|
|
||||||
// value: 'A'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '错',
|
|
||||||
// value: 'B'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// correctGrade: 'A',
|
|
||||||
// userAnswer: '',
|
|
||||||
// analysis: '解析'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// 正确列表
|
|
||||||
rightList: [],
|
rightList: [],
|
||||||
// 错误列表
|
// 错误列表
|
||||||
wrongList: [],
|
wrongList: [],
|
||||||
// 未答列表
|
// 未答列表
|
||||||
unAnsweredList: [],
|
unAnsweredList: [],
|
||||||
list: []
|
list: [],
|
||||||
|
startX: 0, // 起始触摸点X坐标
|
||||||
|
endX: 0 // 结束触摸点X坐标
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opt) {
|
onLoad(opt) {
|
||||||
|
|
@ -618,6 +323,44 @@ export default {
|
||||||
element.isActive = false
|
element.isActive = false
|
||||||
})
|
})
|
||||||
item.isActive = true
|
item.isActive = true
|
||||||
|
},
|
||||||
|
clickImg(url) {
|
||||||
|
this.isHide = true
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
|
// this.screenCount--
|
||||||
|
},
|
||||||
|
touchStart(event) {
|
||||||
|
this.startX = 0
|
||||||
|
this.endX = 0
|
||||||
|
console.log('🚀 ~ 开始 ~ event:', event)
|
||||||
|
// 记录触摸开始的位置
|
||||||
|
this.startX = event.touches[0].clientX
|
||||||
|
console.log('🚀 ~ touchStart ~ this.startX:', this.startX)
|
||||||
|
},
|
||||||
|
touchMove(event) {
|
||||||
|
console.log('🚀 ~ 移动 ~ event:', event)
|
||||||
|
// 在触摸过程中可以获取当前触摸点位置
|
||||||
|
this.endX = event.touches[0].clientX
|
||||||
|
console.log('🚀 ~ touchMove ~ this.endX:', this.endX)
|
||||||
|
},
|
||||||
|
touchEnd() {
|
||||||
|
// 判断滑动方向
|
||||||
|
if (this.startX != 0 && this.endX != 0 && this.startX - this.endX > 10) {
|
||||||
|
// 左滑
|
||||||
|
console.log('向左滑动')
|
||||||
|
this.currentIndex++
|
||||||
|
} else if (this.startX != 0 && this.endX != 0 && this.endX - this.startX > 10) {
|
||||||
|
// 右滑
|
||||||
|
console.log('向右滑动')
|
||||||
|
this.currentIndex--
|
||||||
|
}
|
||||||
|
if (this.currentIndex < 0) {
|
||||||
|
this.currentIndex = 0
|
||||||
|
} else if (this.currentIndex > this.questionList.length - 1) {
|
||||||
|
this.currentIndex = this.questionList.length - 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -736,11 +479,16 @@ export default {
|
||||||
|
|
||||||
.options {
|
.options {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
option-wrapper {
|
||||||
|
max-height: 500px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
.option {
|
.option {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
margin-bottom: 5px;
|
||||||
background: #f4f9fe;
|
background: #f4f9fe;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -253,4 +253,17 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
/* 隐藏视频控件的进度条 */
|
||||||
|
#video::-webkit-media-controls-progress-bar {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 如果需要隐藏其他控件 */
|
||||||
|
#video::-webkit-media-controls-panel {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#video::-webkit-media-controls-play-button {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="wrapper">
|
<view class="wrapper">
|
||||||
<u-navbar title="学习项目" @leftClick="leftClick" placeholder />
|
<u-navbar title="练习" @leftClick="leftClick" placeholder />
|
||||||
<!-- <div class="top-container">
|
<!-- <div class="top-container">
|
||||||
<u-avatar :src="avatar" size="60" />
|
<u-avatar :src="avatar" size="60" />
|
||||||
<div class="name">{{ userName }}</div>
|
<div class="name">{{ userName }}</div>
|
||||||
|
|
@ -194,7 +194,7 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wrapper {
|
.wrapper {
|
||||||
height: 94vh;
|
height: 94vh;
|
||||||
background: url('/static/images/exercises-bg.png') no-repeat;
|
background: url(require('/static/images/exercises-bg.png')) no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ export default {
|
||||||
.right-top {
|
.right-top {
|
||||||
height: 98px;
|
height: 98px;
|
||||||
// background: #e7ac67;
|
// background: #e7ac67;
|
||||||
background: url('/static/images/order-exercises.png') no-repeat;
|
background: url(require('/static/images/order-exercises.png')) no-repeat;
|
||||||
background-size: 100% 98px;
|
background-size: 100% 98px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue