提交 100f7aba authored 作者: lihuihui's avatar lihuihui

updata

上级 c86f6e66
...@@ -136,11 +136,9 @@ export default { ...@@ -136,11 +136,9 @@ export default {
methods: { methods: {
goAbilityExam() { goAbilityExam() {
this.$router.push({ this.$router.push({
path: '/exam/answer', path: '/exam/index',
query: { query: {
type: 1, t: 1
is_create: 1,
papersUrl: 'zy/v2/examination/examination-papers'
} }
}) })
}, },
......
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
<swiper-slide :key="dIndex+dItem.id" :data-dId="dItem.id" :data-cId="item.id"> <swiper-slide :key="dIndex+dItem.id" :data-dId="dItem.id" :data-cId="item.id">
<!-- <answer :item="item" :dItem="dItem" :currentNum="currentNum" :questionsData="questionsData" :requestData="requestData" :requestData2="requestData2"></answer> --> <!-- <answer :item="item" :dItem="dItem" :currentNum="currentNum" :questionsData="questionsData" :requestData="requestData" :requestData2="requestData2"></answer> -->
<div class="title"> <div class="title">
<div class="type">{{ dItem.question_title }}</div> <div class="type" v-if="item.type == 1">单选题</div>
<div class="type" v-if="item.type == 2">多选题</div>
<div class="type" v-if="item.type == 5">案例题</div>
<div class="type" v-if="item.type == 6">判断题</div>
<div class="count">{{ currentNum }}/{{ questionsData.sheet.question_count }}</div> <div class="count">{{ currentNum }}/{{ questionsData.sheet.question_count }}</div>
</div> </div>
<div class="topic" v-html="dItem.question_content"> <div class="topic" v-html="dItem.question_content">
...@@ -135,6 +138,7 @@ export default { ...@@ -135,6 +138,7 @@ export default {
remainingTime: '01:00:00', remainingTime: '01:00:00',
currentNum: 1, currentNum: 1,
isAnalysis: false, isAnalysis: false,
swiperSign: 0,
swiperOptions: { swiperOptions: {
observer: true, observer: true,
on: { on: {
...@@ -149,6 +153,17 @@ export default { ...@@ -149,6 +153,17 @@ export default {
_this.isAnalysis = false _this.isAnalysis = false
_this.currentNum = this.activeIndex + 1 _this.currentNum = this.activeIndex + 1
_this.currentNum === _this.questionsData.sheet.question_count ? _this.nextBtnShow = false : _this.nextBtnShow = true _this.currentNum === _this.questionsData.sheet.question_count ? _this.nextBtnShow = false : _this.nextBtnShow = true
},
slidePrevTransitionEnd: function() {
if (this.activeIndex === _this.questionsData.sheet.question_count - 1) {
this.slideTo(_this.swiperSign, 0, false)
_this.currentNum = this.activeIndex + 1
}
},
slideNextTransitionEnd: function() {
if (this.activeIndex === _this.questionsData.sheet.question_count - 1) {
_this.swiperSign = _this.questionsData.sheet.question_count - 1
}
} }
} }
}, },
...@@ -283,6 +298,7 @@ export default { ...@@ -283,6 +298,7 @@ export default {
} }
}, },
showCard() { showCard() {
this.swiperSign = this.swiper.activeIndex
document.getElementById('bottom-view').scrollTop = 0 document.getElementById('bottom-view').scrollTop = 0
this.topicCard.isShow = true this.topicCard.isShow = true
this.swiper.slideTo(this.questionsData.sheet.question_count, 0, false) this.swiper.slideTo(this.questionsData.sheet.question_count, 0, false)
...@@ -303,7 +319,8 @@ export default { ...@@ -303,7 +319,8 @@ export default {
this.requestData[itemCid] = { this.requestData[itemCid] = {
[itemDid]: { [itemDid]: {
sign: true, sign: true,
answer: [] answer: [],
opaVal: []
} }
} }
on() on()
...@@ -312,7 +329,8 @@ export default { ...@@ -312,7 +329,8 @@ export default {
if (!this.requestData[itemCid][itemDid]) { if (!this.requestData[itemCid][itemDid]) {
this.requestData[itemCid][itemDid] = { this.requestData[itemCid][itemDid] = {
sign: true, sign: true,
answer: [] answer: [],
opaVal: []
} }
on() on()
} else { } else {
......
...@@ -125,6 +125,11 @@ export default { ...@@ -125,6 +125,11 @@ export default {
] ]
} }
}, },
created() {
if (this.$route.query.t === 1) {
this.goAbilityExam(1)
}
},
mounted() { mounted() {
// this.getCourseChapterList() // this.getCourseChapterList()
this.scrollDom() this.scrollDom()
......
<template> <template>
<div class="mock-box"> <div class="mock-box" v-if="pageShow">
<div class="top-tit"> <div class="top-tit">
<div class="left">考试时间90分钟</div> <div class="left">考试时间90分钟</div>
<div class="right">总分100分</div> <div class="right">总分100分</div>
...@@ -44,18 +44,16 @@ ...@@ -44,18 +44,16 @@
<script> <script>
import * as api from '@/api/courseExam.js' import * as api from '@/api/courseExam.js'
import * as courseApi from '@/api/course.js'
export default { export default {
data() { data() {
return { return {
roleChange: 1, roleChange: 1,
isExamPop: false isExamPop: false,
pageShow: false
} }
}, },
mounted() { mounted() {
this.abilityExam() this.abilityExam()
courseApi.getCourseList().then(response => {
})
}, },
methods: { methods: {
changeActive(e) { changeActive(e) {
...@@ -69,6 +67,7 @@ export default { ...@@ -69,6 +67,7 @@ export default {
if (res.status === '0' || res.status === '3') { if (res.status === '0' || res.status === '3') {
this.isExamPop = true this.isExamPop = true
} }
this.pageShow = true
}) })
}, },
goAbilityExam(n) { goAbilityExam(n) {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="deti"> <div class="deti">
<div class="val col" v-if="item.status == 1">购买成功</div> <div class="val col" v-if="item.status == 1">购买成功</div>
<div class="val col" v-else @click="goBuy">继续购买</div> <div class="val col" v-else @click="goBuy">继续支付</div>
</div> </div>
</li> </li>
</template> </template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论