Commit 417b8c78 by 陈超

A

parent 97b68e25
...@@ -328,9 +328,9 @@ ...@@ -328,9 +328,9 @@
<div class="testPaperBotm"> <div class="testPaperBotm">
<div class="box"> <div class="box">
<span class="testPaperNum">{{current}}/{{totalQuestion}}</span> <span class="testPaperNum">{{current}}/{{totalQuestion}}</span>
<p class="testPaperLei flex1">单选题</p> <p class="testPaperLei flex1">{{currentQuestionTypeName}}</p>
<img class="testPaperColl" src="__THEME__/img/collect0.png"> <img v-if="currentQuestion.is_collect == 0" @click="onCollect(1)" class="testPaperColl" src="__THEME__/img/collect0.png">
<!-- <img class="testPaperColl" src="../img/collect1.png"> --> <img v-if="currentQuestion.is_collect == 1" @click="onCollect(0)" class="testPaperColl" src="__THEME__/img/collect1.png">
</div> </div>
<div class="testPaperInfo">某种糖果的进价为12元/千克,现购进这种糖果若干千克,每天销售10千克,且从第二天起每天都比前一天降价2元/千克。已知以6元/千克的价格销售的那天正好卖完最后10千克,且总销售额是总进货成本的2倍。问总共进了多少千克这种糖果?</div> <div class="testPaperInfo">某种糖果的进价为12元/千克,现购进这种糖果若干千克,每天销售10千克,且从第二天起每天都比前一天降价2元/千克。已知以6元/千克的价格销售的那天正好卖完最后10千克,且总销售额是总进货成本的2倍。问总共进了多少千克这种糖果?</div>
<ul> <ul>
...@@ -411,17 +411,38 @@ ...@@ -411,17 +411,38 @@
info: {}, info: {},
temp: {}, temp: {},
current: 1, current: 1,
currentType: 0,
paperOptions: {}, paperOptions: {},
countDown: "00:00:00" countDown: "00:00:00"
} }
}, },
computed: { computed: {
totalQuestion: function() { totalQuestion: function() {
return this.paperOptions.questions_count return this.currentQuestion[this.currentType].length
},
currentQuestions: function() {
let optionType = this.currentQuestionType
let questionType = optionType.question_type
let questionData = this.paperOptions.options_questions_data
let questions = questionData[questionType]
return questions
},
currentQuestionType: function() {
return this.paperOptions.options_type[this.currentType]
},
currentQuestionTypeName: function() {
let type = this.currentQuestionType
if(type.question_type_key == 'radio') {
return '单选题'
} else if(type.question_type_key == 'judge') {
return '单选题'
} else if(type.question_type_key == 'multiselect') {
return '单选题'
}
return '未知'
}, },
currentQuestion: function() { currentQuestion: function() {
let type = this.paperOptions.options_type[this.current] return this.currentQuestions[this.current]
} }
}, },
created: function() { created: function() {
...@@ -439,6 +460,9 @@ ...@@ -439,6 +460,9 @@
let minutes = Math.floor((time % 3600) / 60) let minutes = Math.floor((time % 3600) / 60)
let seconds = Math.round(time % 60) let seconds = Math.round(time % 60)
},
onCollect: function(collect) {
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment