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

updata

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