|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
+ <countDown :time="examTime" @change="getUseTime" v-if="type == 'singleTest' || type == 'exam'"></countDown>
|
|
|
<view v-if="!hiddenMode" class="mode">
|
|
|
<view
|
|
|
@click="
|
|
@@ -748,6 +749,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import countDown from "@/components/countDown/index";
|
|
|
import mRadio from "@/components/m-radio/m-radio.vue";
|
|
|
import mRadioGroup from "@/components/m-radio-group/m-radio-group.vue";
|
|
|
import mCheckbox from "@/components/m-checkbox/m-checkbox.vue";
|
|
@@ -832,6 +834,8 @@ export default {
|
|
|
mtc: "摩托车",
|
|
|
kc: "客车",
|
|
|
},
|
|
|
+ examTime:1000*60*45,
|
|
|
+ useTime:'',
|
|
|
problemListTotal: 1,
|
|
|
explainJqVisible: false,
|
|
|
selectProblemListVisible: false,
|
|
@@ -853,6 +857,10 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ getUseTime(leftTime,useTime){
|
|
|
+ this.useTime = useTime
|
|
|
+
|
|
|
+ },
|
|
|
stopAudio() {
|
|
|
let audio = utils.wxUtils.getGlobAudio();
|
|
|
audio.stop();
|
|
@@ -961,10 +969,9 @@ export default {
|
|
|
content: "交卷后不可再修改了",
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
- let useTime = "";
|
|
|
- let useTimer = new Date(that.examTimeUse);
|
|
|
- clearInterval(that.examTimer);
|
|
|
- useTime = `${useTimer.getMinutes()}:${useTimer.getSeconds()}`;
|
|
|
+ let useTime = that.useTime;
|
|
|
+
|
|
|
+
|
|
|
uni.navigateTo({
|
|
|
url:
|
|
|
"/otherPages/mockExamEnd/index?" +
|
|
@@ -1236,6 +1243,7 @@ export default {
|
|
|
tabbar,
|
|
|
explainJs,
|
|
|
funList,
|
|
|
+ countDown,
|
|
|
},
|
|
|
|
|
|
props: {
|
|
@@ -1283,10 +1291,10 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- let that =this
|
|
|
- uni.showLoading({
|
|
|
- title: "加载题目中"
|
|
|
- });
|
|
|
+ let that = this;
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载题目中",
|
|
|
+ });
|
|
|
switch (that.type) {
|
|
|
case "specify":
|
|
|
api.open
|