Browse Source

防真考试

master
unknown 3 weeks ago
parent
commit
b3fb0e095c
  1. 3
      config/api.js
  2. 6
      pages/exercises/beforeExam/beforeExam.vue
  3. 2
      pages/exercises/brushQuestions/brushQuestions.vue
  4. 2
      pages/exercises/brushQuestions/examQuestions.vue
  5. 372
      pages/exercises/exam/exam.vue
  6. 1
      pages/exercises/examSubjiect1/examSubjiect1.vue
  7. 17
      pages/exercises/theoryStudy/theoryStudy.vue

3
config/api.js

@ -60,7 +60,8 @@ export const logOut = (data={}) => http.post('member/auth/logout', data, {custom
export const startExamDo = (data) => http.post('questionExam/saveExam.do', data,) export const startExamDo = (data) => http.post('questionExam/saveExam.do', data,)
// 考试结果页 // 考试结果页
export const examId = (data) => http.post(`questionExam/result-${examId}`, data,) export const examId = (data) => http.post(`questionExam/result-${examId}`, data,)
// 模拟考试次数、通过率
export const idexExam = (data) => http.get(`idex/exam-${data.stepType}-${data.carType}`, )

6
pages/exercises/beforeExam/beforeExam.vue

@ -4,7 +4,7 @@
<view class="backIcon" @click="goBack"> <view class="backIcon" @click="goBack">
<image src="@/static/images/backIcon.png" mode="aspectFill"></image> <image src="@/static/images/backIcon.png" mode="aspectFill"></image>
</view> </view>
<view class="txt">驾驶人科目一考试系统</view>
<view class="txt">驾驶人科目{{ usecarStore.carInfo.stepType==1?'': '四'}}考试系统</view>
</view> </view>
<view class="con"> <view class="con">
@ -27,7 +27,7 @@
<!-- <view class="redt">身份证号123456789123456789</view> --> <!-- <view class="redt">身份证号123456789123456789</view> -->
<view class="redt">考生{{ phone }}</view> <view class="redt">考生{{ phone }}</view>
<view class="btn" @click="$goPage('/pages/exercises/exam/exam?randomNumber='+ randomNumber)">开始考试</view> <view class="btn" @click="$goPage('/pages/exercises/exam/exam?randomNumber='+ randomNumber)">开始考试</view>
<view class="redt">点击确认按钮开始考试!</view>
<view class="redt">点击开始考试按钮开始考试!</view>
<view class="text">操作提示每题考试答案确定后点击下一题电脑立即判定所选答案如选择错误系统将提示正确答案提示后不允许修改答案</view> <view class="text">操作提示每题考试答案确定后点击下一题电脑立即判定所选答案如选择错误系统将提示正确答案提示后不允许修改答案</view>
</view> </view>
</view> </view>
@ -39,6 +39,8 @@
<script setup> <script setup>
import { detectOrient } from '@/utils/utils.js' import { detectOrient } from '@/utils/utils.js'
import { ref, onMounted, nextTick } from 'vue' import { ref, onMounted, nextTick } from 'vue'
import carStore from '@/store/modules/car.js'
let usecarStore = carStore()
let phone = uni.getStorageSync('loginInfo')?.phone let phone = uni.getStorageSync('loginInfo')?.phone
onMounted(()=>{ onMounted(()=>{
detectOrient('#beforeExam') detectOrient('#beforeExam')

2
pages/exercises/brushQuestions/brushQuestions.vue

@ -325,7 +325,7 @@
curOption.value.ans = curOption.value.ans.replace(item.key, '') curOption.value.ans = curOption.value.ans.replace(item.key, '')
return return
} }
curOption.value.ans = curOption.value.ans + item.key
curOption.value.ans = (curOption.value.ans + item.key).split('').sort().join('')
// console.log(curOption.value.ans) // console.log(curOption.value.ans)
} }
} }

2
pages/exercises/brushQuestions/examQuestions.vue

@ -414,7 +414,7 @@
curOption.value.ans = curOption.value.ans.replace(item.key, '') curOption.value.ans = curOption.value.ans.replace(item.key, '')
return return
} }
curOption.value.ans = curOption.value.ans + item.key
curOption.value.ans = (curOption.value.ans + item.key).split('').sort().join('')
// console.log(curOption.value.ans) // console.log(curOption.value.ans)
} }
} }

372
pages/exercises/exam/exam.vue

@ -1,5 +1,6 @@
<template> <template>
<view class="content" id="brushQuestions">
<view id="brushQuestions">
<view class="content">
<view class="row row1"> <view class="row row1">
<view class="userInfoBox"> <view class="userInfoBox">
<view class="examNo"> <view class="examNo">
@ -15,7 +16,7 @@
<view class="avatar"> <view class="avatar">
<image src="@/static/images/avatarbg.png" mode=""></image> <image src="@/static/images/avatarbg.png" mode=""></image>
</view> </view>
<view class="txt">用户{{ phone }}</view>
<view class="txt">用户 <text style="margin-top: 10rpx;">{{ phone }}</text></view>
<!-- <view class="txt">性别</view> --> <!-- <view class="txt">性别</view> -->
<view class="txt">类型{{ usecarStore.carInfo.carTypeName}}</view> <view class="txt">类型{{ usecarStore.carInfo.carTypeName}}</view>
<view class="txt">科目科目{{ usecarStore.carInfo.stepType==1?'一': '四'}}</view> <view class="txt">科目科目{{ usecarStore.carInfo.stepType==1?'一': '四'}}</view>
@ -32,25 +33,34 @@
</view> </view>
</view> </view>
<view class="answer flex-b"> <view class="answer flex-b">
<view class="lab">您的答案{{ curOption.answer }}</view>
<view class="lab">您的答案
<text v-if="questionBank.types==3">{{ curOption.answer=='true'?'A':'B'}}</text>
<text v-else>{{ curOption.answer}}</text>
</view>
<view class="rightSelect flex"> <view class="rightSelect flex">
<view class="lab">选项</view> <view class="lab">选项</view>
<view class="optio flex" v-for="(item,index) in questionBank.optionArr" > <view class="optio flex" v-for="(item,index) in questionBank.optionArr" >
<view class="optionItem" :class="{ active: curOption.answer.includes(item.key)}" @click="chooseOption(item)">{{item.key}}</view>
<view class="optionItem" :class="{ active: curOption.answer?.includes(item.key)}" @click="chooseOption(item)">{{item.key}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="rightBox"> <view class="rightBox">
<!-- 右边盒子 --> <!-- 右边盒子 -->
<table style="width: 100%;height: 100%;">
<table style="width: 100%;height: 100%;" v-if="ansCard.length">
<tr> <tr>
<th class="blueItem br">题目</th> <th class="blueItem br">题目</th>
<th v-for="(item,index) in 10" class="blueItem br">{{index+1}}</th>
<th v-for="(item,index) in usecarStore.carInfo.stepType==1?10:5" class="blueItem br">{{index+1}}</th>
</tr> </tr>
<tr v-for="(item,index) in 10">
<tr v-for="(item,index) in ansCard">
<td class="blueItem bb">{{index+1}}</td> <td class="blueItem bb">{{index+1}}</td>
<td v-for="(item2,index2) in 10" class="ansItem">{{ item2 }}</td>
<td v-for="(item2,index2) in item" class="ansItem" :class="{green: item2.answer==item2.answerMy}" @click="ansCardClick(item2)">
<text v-if="item2.types==3&&item2.answerMy" class="flex" style="justify-content: center;">
<up-icon name="checkmark" color="#55ff7f" size="18" v-if="item2.answer==item2.answerMy"></up-icon>
<up-icon name="close" color="#ff0000" size="18" v-else></up-icon>
</text>
<text v-else>{{ item2.answerMy }}</text>
</td>
</tr> </tr>
</table> </table>
</view> </view>
@ -60,18 +70,18 @@
<view class="row row2"> <view class="row row2">
<view class="timeBox"> <view class="timeBox">
<view class="h3">考试时间</view> <view class="h3">考试时间</view>
<view class="time">1510</view>
<view class="time"><up-count-down :time="info.totalExamTime * 60 * 1000" format="mm:ss" @finish="finishFn" ref="countDownRef"></up-count-down></view>
</view> </view>
<view class="leftTpsBox"> <view class="leftTpsBox">
<view class="card"> <view class="card">
<view class="h3">操作提示</view> <view class="h3">操作提示</view>
<view class="txt">本题为单选题请在备选答案中选择一个你认为正确的答案</view>
<view class="txt">本题为{{types[questionBank.types-1]}}请在备选答案中选择 {{ questionBank.types==2? '多': ''}}个你认为正确的答案</view>
</view> </view>
</view> </view>
<view class="rightBtnBox"> <view class="rightBtnBox">
<view class="btn hui">上一题</view>
<view class="btn hui">下一题</view>
<view class="btn" @click="$goPage('/pages/exercises/examResults/examResults')"></view>
<button class="btn hui" @click="debounce(nextQuestion(-1), 500)" :class="{disable: currentIndex==0}" :disabled="currentIndex==0">上一题</button>
<button class="btn hui" @click="debounce(nextQuestion(1), 500)" :class="{disable: currentIndex>=questionBankList.length-1}" :disabled="currentIndex>=questionBankList.length-1">下一题</button>
<view class="btn"@click="handApaper"> </view>
</view> </view>
</view> </view>
@ -92,15 +102,70 @@
</u-popup> </u-popup>
</view> </view>
</view>
<u-popup :show="showCommit" mode="center" :closeable="true" round="10" @close="closeCommitPopup" >
<view class="commitView">
<view class="commitTit">考试确认窗口</view>
<view class="commitTxt">你当前考试答对{{yesNum}}答错{{ questionBankList.length-yesNum-noNum}}未答{{ noNum }} </view>
<view class="commitTxt">1点击确认交卷将提交考试成绩考试结束</view>
<view class="commitTxt">2点击继续考试将关闭本窗口继续考试</view>
<view class="commitBtn">
<view class="btn border" @click="submitBtnFn">确定交卷</view>
<view class="btn" @click="closeCommitPopup">继续考试</view>
</view>
</view>
</u-popup>
<u-popup :show="showNoPass" mode="center" :closeable="true" @close="showNoPass=false" round="10" >
<view class="commitView">
<view class="commitTit">考试不合格</view>
<view class="commitTxt">学员您本次成绩为{{grade}}</view>
<view class="commitTxt">考试不合格预祝您下次顺利</view>
<view class="commitBtn">
<view class="btn" @click="goBack">确定</view>
</view>
<view class="djs">
<up-count-down :time="4 * 1000" format="ss" @finish="goBack" style="color: red;"></up-count-down> <view class="djsTxt"> <text style="color: red;"></text></view>
</view>
</view>
</u-popup>
<u-popup :show="showWrong" mode="center" :closeable="true" round="10" @close="showWrongClose" >
<view class="commitView">
<view class="commitTit">错题学习</view>
<view class="commitTxt">{{ questionBank.title }}</view>
<view class="commitTxt" v-for="(item,index) in questionBank.optionArr" >
<view class="text"><text >{{item.key}}</text> {{item.text}}</view>
</view>
<view class="rowBg">
<view class="ans">正确答案
<text v-if="questionBank.types==3">{{ questionBank.answer=='true'?'A':'B'}}</text>
<text v-else>{{ questionBank.answer}}</text>
</view>
<view class="ans blue">你的答案
<text v-if="questionBank.types==3">{{ questionBank.answerMy=='true'?'A':'B'}}</text>
<text v-else>{{ questionBank.answerMy}}</text>
</view>
</view>
<view class="commitBtn">
<view class="btn" @click="showWrongClose">继续考试</view>
</view>
<view class="djs">
<view class="djsTxt">页面将在</view> <up-count-down :time="6 * 1000" format="ss" style="color: red;" @finish="showWrongClose" ></up-count-down> <view class="djsTxt"> <text style="color: red;"></text> </view>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script setup> <script setup>
import { detectOrient } from '@/utils/utils.js' import { detectOrient } from '@/utils/utils.js'
import { startExamDo, startExam } from '@/config/api.js'
import { startExamDo, startExam, questionExam } from '@/config/api.js'
import { ref, onMounted, nextTick } from 'vue' import { ref, onMounted, nextTick } from 'vue'
import { debounce } from '@/uni_modules/uview-plus';
import { import {
onLoad, onLoad,
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
@ -112,9 +177,19 @@
randomNumber = options.randomNumber randomNumber = options.randomNumber
}) })
const types = ref([
'单选题',
'多选题',
'判断题'
])
let phone = uni.getStorageSync('loginInfo')?.phone let phone = uni.getStorageSync('loginInfo')?.phone
const currentNav = ref('1')
const showCommit = ref(false)
const showNoPass = ref(false)
const showWrong = ref(false)
const show = ref(false) const show = ref(false)
onMounted(()=>{ onMounted(()=>{
detectOrient('#brushQuestions') detectOrient('#brushQuestions')
}) })
@ -123,13 +198,13 @@
show.value = true show.value = true
} }
function goBack() { function goBack() {
console.log('返回吧')
uni.navigateBack() uni.navigateBack()
} }
// //
const questionBank = ref({}) const questionBank = ref({})
const questionBankList = ref([]) const questionBankList = ref([])
let examInfo = ref([])
let ansCard = ref([])
let examInfo = ref({})
let currentIndex = ref(0) let currentIndex = ref(0)
async function startQuestionFn() { async function startQuestionFn() {
try{ try{
@ -145,6 +220,8 @@
uni.hideLoading() uni.hideLoading()
questionBank.value = res.questionBank[0] questionBank.value = res.questionBank[0]
questionBankList.value = res.questionBank questionBankList.value = res.questionBank
let size = usecarStore.carInfo.stepType==1?10:5
ansCard.value = chunk(questionBankList.value, size)
initOptionArr() initOptionArr()
examInfo.value = res examInfo.value = res
}catch(e){ }catch(e){
@ -153,7 +230,23 @@
} }
startQuestionFn() startQuestionFn()
//
function chunk(arr, size) {
if(arr.length==0) return []
let result = []
let tmp = []
arr.forEach((item,index)=>{
if(tmp.length==0) {
result.push(tmp)
}
item.index = index
tmp.push(item)
if(tmp.length==size) {
tmp = []
}
})
return result
}
function initOptionArr() { function initOptionArr() {
questionBank.value.optionArr = [] questionBank.value.optionArr = []
let abcd = [ let abcd = [
@ -177,40 +270,88 @@
}) })
// //
if(questionBank.value.types==3) {
questionBank.value.optionArr[0].key1 = 'true'
questionBank.value.optionArr[1].key1 = 'false'
}
console.log(questionBank.value.optionArr)
// if(questionBank.value.types==3) {
// questionBank.value.optionArr[0].key1 = 'true'
// questionBank.value.optionArr[1].key1 = 'false'
// }
// console.log(questionBank.value.optionArr)
} }
// //
const curOption = ref({}) const curOption = ref({})
async function chooseOption(item) { async function chooseOption(item) {
if(questionBank.value.answerMy) return
console.log(item) console.log(item)
if(questionBank.value.types != 2) { if(questionBank.value.types != 2) {
item.answer = item.key item.answer = item.key
curOption.value = item curOption.value = item
}else if(questionBank.value.types == 2){ }else if(questionBank.value.types == 2){
if(!curOption.value.ans) curOption.value.ans = ''
if(curOption.value.ans.includes(item.key)) {
curOption.value.ans = curOption.value.ans.replace(item.key, '')
if(!curOption.value.answer) curOption.value.answer = ''
if(curOption.value.answer.includes(item.key)) {
curOption.value.answer = curOption.value.answer.replace(item.key, '')
return return
} }
curOption.value.ans = curOption.value.ans + item.key
curOption.value.answer = (curOption.value.answer + item.key).split('').sort().join('')
// console.log(curOption.value.ans) // console.log(curOption.value.ans)
} }
}
//
async function nextQuestion(num) {
// ,
if(curOption.value.answer) {
questionBank.value.answerMy = curOption.value.answer
if(questionBank.value.types==3) questionBank.value.answerMy = curOption.value.answer=='A'? 'true': 'false'
}
//
if(questionBank.value.answerMy&&questionBank.value.answer != questionBank.value.answerMy&&curOption.value.isNext != 'next') {
curOption.value.isNext = 'next'
showWrong.value = true
if (countDownRef.value) {
countDownRef.value.pause();
}
return false
}
curOption.value = {}
currentIndex.value = currentIndex.value + num
getQuestionFn()
}
//
async function getQuestionFn() {
console.log(currentIndex.value)
questionBank.value = questionBankList.value[currentIndex.value]
curOption.value = {}
curOption.value.isNext = ''
if(questionBank.value.answerMy) curOption.value.answer = questionBank.value.answerMy
initOptionArr()
}
//
function ansCardClick(item) {
currentIndex.value = item.index
getQuestionFn()
}
function goOnExam() {
showWrong.value = false
} }
// //
let grade = ref(0)
async function submitBtnFn() { async function submitBtnFn() {
let wrongArr = questionBankList.value.filter(item=>item.yes!=1)
//
if(curOption.value.answer) questionBank.value.answerMy = curOption.value.answer
let wrongArr = questionBankList.value.filter(item=>item.answer!=item.answerMy)
let worngId = wrongArr.map(item=>item.id).join(',') let worngId = wrongArr.map(item=>item.id).join(',')
// grade = 100/ *
grade.value = info.value.funllScore / questionBankList.value.length * (questionBankList.value.length - wrongArr.length)
let obj = { let obj = {
"answer": null, "answer": null,
"carType": usecarStore.carInfo.carType, "carType": usecarStore.carInfo.carType,
"examId": examInfo.value.id, "examId": examInfo.value.id,
"examType": 1,
"grade": questionBankList.value.length - wrongArr.length,
"examType": 2,
"grade": grade.value,
"isEnd": 1, "isEnd": 1,
"pass": 1, "pass": 1,
"sort": examInfo.value.sort, "sort": examInfo.value.sort,
@ -220,12 +361,69 @@
} }
const res = await startExamDo(obj) const res = await startExamDo(obj)
console.log(res) console.log(res)
uni.$u.toast('已交卷')
// uni.$u.toast('')
if(showCommit.value) showCommit.value = false
if(grade.value<info.value.score) {
showNoPass.value = true
}else {
setTimeout(()=>{ setTimeout(()=>{
uni.navigateBack() uni.navigateBack()
},1500) },1500)
} }
}
function finishFn() {
uni.$u.toast('考试时间已到,准备自动为您交卷')
setTimeout(()=>{
submitBtnFn()
},1500)
}
//
const countDownRef = ref(null)
const yesNum = ref(0)
const noNum = ref(0)
function handApaper() {
//
if(curOption.value.answer) questionBank.value.answerMy = curOption.value.answer
yesNum.value = questionBankList.value.filter(item=>item.answer==item.answerMy).length
noNum.value = questionBankList.value.filter(item=>item.answerMy==undefined).length
console.log(questionBankList.value)
//
if(noNum) {
showCommit.value = true
if (countDownRef.value) {
countDownRef.value.pause();
}
}else {
submitBtnFn()
}
}
//
function closeCommitPopup() {
showCommit.value = false
if (countDownRef.value) {
countDownRef.value.start();
}
}
//
function showWrongClose() {
showWrong.value = false
if (countDownRef.value) {
countDownRef.value.start();
}
curOption.value = {}
currentIndex.value = currentIndex.value + 1
getQuestionFn()
}
//
let info = ref({})
async function questionExamFn() {
const {data:res} = await questionExam({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})
info.value = res
}
questionExamFn()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -428,7 +626,7 @@
} }
.rightBox { .rightBox {
flex: 1;
flex: 1.4;
background-color: #fff; background-color: #fff;
table { table {
@ -450,9 +648,9 @@
text-align: center; text-align: center;
border-bottom: 1px solid #E1DFDF; border-bottom: 1px solid #E1DFDF;
border-right: 1px solid #E1DFDF; border-right: 1px solid #E1DFDF;
color: green;
color: #ff0000;
&.green { &.green {
color: green;
color: #55ff7f;
} }
&.red { &.red {
color: red; color: red;
@ -527,17 +725,25 @@
// justify-content: space-between; // justify-content: space-between;
justify-content: flex-end; justify-content: flex-end;
.btn { .btn {
width: 123rpx;
// padding: 0 24rpx;
margin-left: 20rpx;
width: 133rpx;
margin: 0 0 0 20rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
background: #F4F4F4;
border: 1px solid #E1DFDF;
background: #3776FF;
line-height: 60rpx; line-height: 60rpx;
color: #fff;
border: none;
border-radius: 8rpx;
&.disable {
opacity: 0.4;
}
&.hui {
background: #F4F4F4; background: #F4F4F4;
color: #333;
// border: 1rpx solid #E1DFDF;
}
} }
} }
} }
@ -547,7 +753,7 @@
.picBox { .picBox {
width: 100%; width: 100%;
flex: 2;
flex: 1.8;
background-color: #fff; background-color: #fff;
border: 1px solid #F0F0F0; border: 1px solid #F0F0F0;
padding: 20rpx; padding: 20rpx;
@ -567,5 +773,89 @@
} }
} }
.commitView {
width: 780rpx;
// height: 400rpx;
background: #FFFFFF;
border-radius: 10rpx;
padding: 40rpx;
.commitTit {
font-weight: bold;
font-size: 32rpx;
color: #333333;
line-height: 40rpx;
margin-bottom: 34rpx;
text-align: center;
}
.commitTxt {
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #333333;
line-height: 42rpx;
}
.rowBg {
width: 100%;
height: 64rpx;
background: #F4F4F4;
border-radius: 10rpx;
font-size: 24rpx;
margin-top: 20rpx;
color: #333333;
line-height: 64rpx;
display: flex;
align-items: center;
padding: 0 0 0 20rpx;
.blue {
color: #3776FF;
margin-left: 30rpx;
}
}
.commitBtn {
display: flex;
align-items: center;
justify-content: center;
margin: 50rpx 0 20rpx 0;
.btn.border {
background: none;
color: #3776FF;
border: 1px solid #3776FF;
}
.btn {
width: 180rpx;
height: 60rpx;
background: #3776FF;
border-radius: 10rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 60rpx;
margin: 0 20rpx;
}
}
}
.djs {
display: flex;
align-items: center;
justify-content: center;
margin-top: 6rpx;
.djsTxt {
font-size: 24rpx;
color: #999;
margin: -4rpx 0 0 2rpx;
}
}
</style>
<style lang="scss">
.djs {
:deep .u-count-down__text {
color: red !important;
}
}
</style> </style>

1
pages/exercises/examSubjiect1/examSubjiect1.vue

@ -48,7 +48,6 @@
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
let phone = uni.getStorageSync('loginInfo')?.phone let phone = uni.getStorageSync('loginInfo')?.phone
//
let info = ref({}) let info = ref({})
async function questionExamFn() { async function questionExamFn() {
const {data:res} = await questionExam({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType}) const {data:res} = await questionExam({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})

17
pages/exercises/theoryStudy/theoryStudy.vue

@ -58,8 +58,8 @@
<view class="simulatedExam flex-b"> <view class="simulatedExam flex-b">
<view class="leftTxt"> <view class="leftTxt">
<view class="h8">{{ usecarStore.carInfo.stepType==1? '一': '四'}}模拟考试</view> <view class="h8">{{ usecarStore.carInfo.stepType==1? '一': '四'}}模拟考试</view>
<view class="text">考试次数1</view>
<view class="text">预测通过率10%</view>
<view class="text">考试次数{{ examInfo.accumulate }}</view>
<view class="text">预测通过率{{ examInfo.exampassRate}}%</view>
<view class="btnBox flex"> <view class="btnBox flex">
<!-- @click="$goPage('/pages/exercises/examSubjiect1/examSubjiect1')" --> <!-- @click="$goPage('/pages/exercises/examSubjiect1/examSubjiect1')" -->
<view class="btnTxt" @click="$goPage('/pages/exercises/examSubjiect1/examSubjiect1')">开始考试</view> <view class="btnTxt" @click="$goPage('/pages/exercises/examSubjiect1/examSubjiect1')">开始考试</view>
@ -89,7 +89,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { questbanktypeApi, indexNoticeApi, indexAdApi, indexAdCount, examProcessInfo} from '@/config/api.js'
import { questbanktypeApi, indexNoticeApi, indexAdApi, indexAdCount, examProcessInfo, idexExam} from '@/config/api.js'
import carStore from '@/store/modules/car.js' import carStore from '@/store/modules/car.js'
let usecarStore = carStore() let usecarStore = carStore()
const list1 = [ const list1 = [
@ -170,6 +170,7 @@
await indexNotice() await indexNotice()
await indexAd() await indexAd()
await indexAdCountFn() await indexAdCountFn()
await idexExamFn()
uni.hideLoading() uni.hideLoading()
} }
@ -198,8 +199,16 @@
const {data:res} = await indexAdCount({subject: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType}) const {data:res} = await indexAdCount({subject: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})
adCount.value = res adCount.value = res
} }
indexAdCountFn() indexAdCountFn()
//
let examInfo = ref({})
async function idexExamFn() {
const {data:res} = await idexExam({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})
examInfo.value = res
}
idexExamFn()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save