样式优化
This commit is contained in:
parent
48df6fd6e7
commit
0400ac61ce
|
|
@ -21,12 +21,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="explain">*进入考试后,计时结束将自动交卷,退出后将会继续计时,考试期间请勿登录其他设备,否则成绩作废</div>
|
||||
<div class="explain">
|
||||
*进入考试后,计时结束将自动交卷,退出后将会继续计时,考试期间请勿登录其他设备,否则成绩作废
|
||||
</div>
|
||||
|
||||
<!-- 底部固定按钮 -->
|
||||
<div class="bottom-btn">
|
||||
<div class="btn">
|
||||
<u-button type="primary" size="small" shape="circle" text="进入考试" @click="openModal" />
|
||||
<u-button type="primary" shape="circle" text="进入考试" @click="openModal" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -117,7 +119,7 @@ export default {
|
|||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
height: 90vh;
|
||||
height: calc(100vh - 90px);
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
|
|
@ -129,14 +131,14 @@ export default {
|
|||
|
||||
.subtitle {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
color: #3185f0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
margin-top: 50px;
|
||||
|
||||
.duration-wrapper,
|
||||
.count-wrapper,
|
||||
|
|
@ -182,6 +184,7 @@ export default {
|
|||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background-color: #fff;
|
||||
padding: 10px 0;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,19 @@
|
|||
<view :style="{ fontSize: fontSize + 'px' }">
|
||||
<u-navbar leftIcon="" title="考试" :placeholder="true">
|
||||
<view class="u-nav-slot" slot="right">
|
||||
<u-tag text="小" :type="fontSize == 19 ? 'primary' : 'info'" @click="changeFont(19)" style="margin-right: 8px" ></u-tag>
|
||||
<u-tag text="中" :type="fontSize == 21 ? 'primary' : 'info'" @click="changeFont(21)" style="margin-right: 8px"></u-tag>
|
||||
<u-tag text="大" :type="fontSize == 23 ? 'primary' : 'info'" @click="changeFont(23)"></u-tag>
|
||||
<u-tag
|
||||
text="小"
|
||||
:type="fontSize == 19 ? 'primary' : 'info'"
|
||||
@click="changeFont(19)"
|
||||
style="margin-right: 8px"
|
||||
></u-tag>
|
||||
<u-tag
|
||||
text="中"
|
||||
:type="fontSize == 21 ? 'primary' : 'info'"
|
||||
@click="changeFont(20.5)"
|
||||
style="margin-right: 8px"
|
||||
></u-tag>
|
||||
<u-tag text="大" :type="fontSize == 23 ? 'primary' : 'info'" @click="changeFont(22)"></u-tag>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<div class="content" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd">
|
||||
|
|
@ -70,27 +80,30 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 题目 -->
|
||||
<div class="question-wrapper" v-for="(item, index) in questionList" :key="index" v-show="index == currentIndex">
|
||||
<div class="question-type-wrapper">
|
||||
<div class="line" />
|
||||
<div class="question-type">
|
||||
<div class="line" :style="{ height: fontSize - 8 + 'px' }" />
|
||||
<div class="question-type" :style="{ fontSize: fontSize - 2 + 'px' }">
|
||||
<div v-if="item.examType == 1">单选题({{ item.questionScore }}分)</div>
|
||||
<div v-if="item.examType == 2">多选题({{ item.questionScore }}分)</div>
|
||||
<div v-if="item.examType == 3">判断题({{ item.questionScore }}分)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="question">{{ currentIndex + 1 }}. {{ item.examTopic }}</div>
|
||||
<u--image
|
||||
<div class="question" :style="{ fontSize: fontSize + 2 + 'px' }">
|
||||
{{ 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"
|
||||
style="margin: 0 10px 15px 0"
|
||||
@click="clickImg(fileUrl + item.examTopicUrl)"
|
||||
/>
|
||||
<u-line />
|
||||
|
||||
<div class="options">
|
||||
<div class="option-wrapper" v-for="(option, optionIndex) in item.listOption" :key="optionIndex">
|
||||
<div
|
||||
|
|
@ -101,13 +114,13 @@
|
|||
<div class="option-item">{{ option.optionIdent }}.</div>
|
||||
<div class="option-content">{{ option.optionContent }}</div>
|
||||
</div>
|
||||
<u--image
|
||||
<u-image
|
||||
v-if="option.optionUrl"
|
||||
:showLoading="true"
|
||||
:src="fileUrl + option.optionUrl || ''"
|
||||
width="60px"
|
||||
height="60px"
|
||||
style="margin-bottom: 10px"
|
||||
style="margin: 15px 10px 5px 0"
|
||||
@click="clickImg(fileUrl + option.optionUrl)"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -117,7 +130,7 @@
|
|||
<!-- 底部按钮 -->
|
||||
<div style="height: 75px"></div>
|
||||
<div class="bottom-btn">
|
||||
<div class="btn" v-show="currentIndex != 0">
|
||||
<div class="btn" v-if="currentIndex != 0">
|
||||
<u-button shape="circle" text="上一题" @click="currentIndex--" />
|
||||
</div>
|
||||
<div class="btn" v-if="currentIndex !== questionList.length - 1">
|
||||
|
|
@ -162,8 +175,10 @@ import {
|
|||
updStudyDurationExamPractice
|
||||
} from '@/api/eduApp'
|
||||
import config from '@/config'
|
||||
import uLine from '../../../uni_modules/uview-ui/components/u-line/u-line.vue'
|
||||
|
||||
export default {
|
||||
components: { uLine },
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
|
|
@ -686,6 +701,7 @@ export default {
|
|||
height: 90vh;
|
||||
|
||||
.top-content {
|
||||
margin: 10px;
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
|
|
@ -749,15 +765,13 @@ export default {
|
|||
.question-wrapper {
|
||||
padding: 10px;
|
||||
.question-type-wrapper {
|
||||
margin: 20px 0;
|
||||
margin: 20px 0 10px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 2px;
|
||||
height: 11px;
|
||||
background: #1989fa;
|
||||
border: 2px solid #1989fa;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.question-type {
|
||||
|
|
@ -766,13 +780,13 @@ export default {
|
|||
}
|
||||
|
||||
.question {
|
||||
margin-bottom: 8px;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.options {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 30px;
|
||||
margin: 5px 0 30px 20px;
|
||||
overflow: auto;
|
||||
.option-wrapper {
|
||||
max-height: 200px;
|
||||
|
|
@ -797,7 +811,7 @@ export default {
|
|||
color: #333;
|
||||
}
|
||||
.option-content {
|
||||
margin-left: 10px;
|
||||
/* margin-left: 10px; */
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
|
@ -812,12 +826,17 @@ export default {
|
|||
padding: 15px 0;
|
||||
padding-bottom: 18px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.btn {
|
||||
width: 100px;
|
||||
margin-right: 10px;
|
||||
&:first-child {
|
||||
margin-left: 15px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
/>
|
||||
</div> -->
|
||||
<div class="btn">
|
||||
<u-button type="primary" size="small" shape="circle" text="重新考试" @click="handleResetExamination" />
|
||||
<u-button type="primary" shape="circle" text="重新考试" @click="handleResetExamination" />
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
|
|
@ -274,7 +274,7 @@ export default {
|
|||
.center-container {
|
||||
margin: 0 10px;
|
||||
width: calc(100% - 20px);
|
||||
height: 250px;
|
||||
height: 275px;
|
||||
background: #e8f2fe;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
|
|
@ -287,7 +287,7 @@ export default {
|
|||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin: 0 10px;
|
||||
margin: 30px 10px 10px;
|
||||
|
||||
.item {
|
||||
margin-top: 25px;
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ export default {
|
|||
return
|
||||
}
|
||||
const params = {
|
||||
...item,
|
||||
id: item.examMsg.id, // 考试id
|
||||
cutNum: item.examMsg.isCut, // 切屏次数
|
||||
examNum: item.examMsg.examNum, // 考试次数
|
||||
|
|
@ -297,7 +298,9 @@ export default {
|
|||
studyId: this.studyId, // 学习id
|
||||
responseTime: item.examMsg.responseTime, // 考试时长
|
||||
score: item.examMsg.score, // 总分
|
||||
passScore: item.examMsg.passScore // 及格分数
|
||||
passScore: item.examMsg.passScore, // 及格分数
|
||||
name: item.examMsg.name, // 考试名称
|
||||
validityDate: item.examMsg.validityDate // 考试时间
|
||||
}
|
||||
console.log('🚀 ~ toggleTheoryExam ~ params:', params)
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
Loading…
Reference in New Issue