提交 f67d5357 authored 作者: lihuihui's avatar lihuihui

updata

上级 f95fefa0
module.exports = { module.exports = {
demain: 'dev.ezijing.com', demain: 'dev.ezijing.com',
url: 'https://transport.ezijing.com/api', url: 'https://transport2.ezijing.com/api',
// apiBaseURL: 'https://zy2.ezijing.com/', // apiBaseURL: 'https://zy2.ezijing.com/',
webpack: { webpack: {
externals: { externals: {
...@@ -19,12 +19,12 @@ module.exports = { ...@@ -19,12 +19,12 @@ module.exports = {
// '^/api/passport': '/' // 需要rewrite重写的 // '^/api/passport': '/' // 需要rewrite重写的
// } // }
// }, // },
'/usercenter': { // '/usercenter': {
target: 'https://api-usercenter.ezijing.com', // target: 'https://api-usercenter.ezijing.com',
pathRewrite: { // pathRewrite: {
'^/usercenter': '/' // 需要rewrite重写的 // '^/usercenter': '/' // 需要rewrite重写的
} // }
} // }
/* 多个代理 */ /* 多个代理 */
// '/api': { // '/api': {
// target: $GLOBAL.webConf.url, // target: $GLOBAL.webConf.url,
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<div class="card_box"> <div class="card_box">
<div class="head" id="top-view2"> <div class="head" id="top-view2">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<div class="title" @click="$emit('showCard')">答题卡</div>
</div> </div>
<div id="bottom-view2"> <div id="bottom-view2">
<div class="card_con"> <div class="card_con">
...@@ -71,7 +70,7 @@ export default { ...@@ -71,7 +70,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.scrollDom() // this.scrollDom()
}, },
data() { data() {
return { return {
......
<template> <template>
<div class="exam-box"> <div class="exam-box">
<div id="top-view"> <div id="top-view" v-show="!topicCard.isShow">
<div class="tool-box"> <div class="tool-box">
<div class="time">{{ remainingTime }}</div> <div class="time">{{ remainingTime }}</div>
<div class="tag-box"> <div class="tag-box">
...@@ -56,16 +56,18 @@ ...@@ -56,16 +56,18 @@
</swiper-slide> </swiper-slide>
</template> </template>
</template> </template>
<swiper-slide>
<card @cardChange="cardChange" @showCard="showCard" :questionsData="questionsData" :requestData="requestData"></card>
</swiper-slide>
</swiper> </swiper>
</div> </div>
<div class="btn-box"> <div class="btn-box" v-show="!topicCard.isShow">
<div class="padd"> <div class="padd">
<div class="analysis" @click="analyShow" v-if="$route.query.id || $route.query.course_id || $route.query.chapter_id">查看解析</div> <div class="analysis" @click="analyShow" v-if="$route.query.id || $route.query.course_id || $route.query.chapter_id">查看解析</div>
<div class="btn left" @click="switchQuestions('left')">上一题</div> <div class="btn left" @click="switchQuestions('left')" v-show="currentNum !== 1">上一题</div>
<div class="btn right" @click="switchQuestions('right')">下一题</div> <div class="btn right" @click="switchQuestions('right')" v-show="nextBtnShow">下一题</div>
</div> </div>
</div> </div>
<card v-if="isCard" @cardChange="cardChange" @showCard="showCard" :questionsData="questionsData" :requestData="requestData"></card>
<!-- <exam-end @cardChange="cardChange;examIsShow = false;isExamSubPop = false" @examEndBack="examEndBack" v-if="examIsShow" :questionsData="questionsData" :requestData="requestData"></exam-end> --> <!-- <exam-end @cardChange="cardChange;examIsShow = false;isExamSubPop = false" @examEndBack="examEndBack" v-if="examIsShow" :questionsData="questionsData" :requestData="requestData"></exam-end> -->
<div class="exam_submit" v-if="isExamSubPop"> <div class="exam_submit" v-if="isExamSubPop">
<div class="pop"> <div class="pop">
...@@ -82,7 +84,7 @@ ...@@ -82,7 +84,7 @@
<div class="tit">提示</div> <div class="tit">提示</div>
<img src="../assets/images/time.png" alt=""> <img src="../assets/images/time.png" alt="">
<div class="txt">考试时间到!答题结束</div> <div class="txt">考试时间到!答题结束</div>
<div class="btn" @click="goExamResult ;examSubmit(1, true)">确定</div> <div class="btn" @click="submitShowPop;goExamResult ;examSubmit(1, true)">确定</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -110,6 +112,7 @@ export default { ...@@ -110,6 +112,7 @@ export default {
data () { data () {
const _this = this const _this = this
return { return {
nextBtnShow: true,
isCard: false, isCard: false,
opaKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], opaKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
remainingTime: '01:00:00', remainingTime: '01:00:00',
...@@ -119,9 +122,15 @@ export default { ...@@ -119,9 +122,15 @@ export default {
observer: true, observer: true,
on: { on: {
slideChangeTransitionStart: function() { slideChangeTransitionStart: function() {
if (this.activeIndex === _this.questionsData.sheet.question_count) {
_this.topicCard.isShow = true
} else {
_this.topicCard.isShow = false
}
document.getElementById('bottom-view').scrollTop = 0 document.getElementById('bottom-view').scrollTop = 0
_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
} }
} }
}, },
...@@ -136,7 +145,10 @@ export default { ...@@ -136,7 +145,10 @@ export default {
isExamSubPop: false, isExamSubPop: false,
timePopIsShow: false, timePopIsShow: false,
initTime: null, initTime: null,
cache: null cache: null,
topicCard: {
isShow: false
}
} }
}, },
computed: { computed: {
...@@ -205,13 +217,18 @@ export default { ...@@ -205,13 +217,18 @@ export default {
cardChange(e) { cardChange(e) {
for (let i = 0; i < this.questionsData.sheet.question_count; i++) { for (let i = 0; i < this.questionsData.sheet.question_count; i++) {
if (this.swiper.slides[i].attributes['data-dId'].nodeValue === e) { if (this.swiper.slides[i].attributes['data-dId'].nodeValue === e) {
setTimeout(() => {
this.swiper.slideTo(i, 0, false) this.swiper.slideTo(i, 0, false)
this.currentNum = this.swiper.activeIndex + 1 this.currentNum = this.swiper.activeIndex + 1
this.topicCard.isShow = false
this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
}, 100)
} }
} }
}, },
showCard() { showCard() {
this.isCard = !this.isCard this.topicCard.isShow = true
this.swiper.slideTo(this.questionsData.sheet.question_count, 0, false)
}, },
// 标记 // 标记
signQuestion() { signQuestion() {
...@@ -568,6 +585,7 @@ export default { ...@@ -568,6 +585,7 @@ export default {
font-weight: bold; font-weight: bold;
padding: .35rem .2rem; padding: .35rem .2rem;
margin-bottom: .2rem; margin-bottom: .2rem;
word-wrap:break-word;
} }
.active{ .active{
color: #fff; color: #fff;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论