|
@@ -32,7 +32,7 @@
|
|
|
<div class="button-group" v-else-if="!submitState">
|
|
|
<div class="back-button" @click="page-=1">上一页</div>
|
|
|
<div class="next-button" @click="page+=1" v-if="page!==5">下一页</div>
|
|
|
- <div class="confim-button" @click="submit" v-else>提交</div>
|
|
|
+ <div class="confim-button" @click="submit(false)" v-else>提交</div>
|
|
|
</div>
|
|
|
<div class="bounced" :style="conTop" v-if="submitState">
|
|
|
<img :src="icon" alt="">
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
icon: require('../../public/img/contest/success.png'),
|
|
|
page: 1,
|
|
|
questions: [],
|
|
|
- chooseList: [],
|
|
|
+ chooseList: new Array(50),
|
|
|
paperId: null,
|
|
|
timer: null,
|
|
|
paperDuration: 0,
|
|
@@ -81,7 +81,7 @@ export default {
|
|
|
methods: {
|
|
|
getAttendContest () {
|
|
|
this.$api.post('/mCompetition/attendContest', {
|
|
|
- userId: 7
|
|
|
+ userId: 6
|
|
|
}).then(r => {
|
|
|
this.questions = r.object.questions
|
|
|
this.paperId = r.object.paperId
|
|
@@ -92,10 +92,10 @@ export default {
|
|
|
this.$set(this.chooseList, q, a)
|
|
|
},
|
|
|
// false 需确认 true 直接请求
|
|
|
- submit (type) {
|
|
|
+ submit (type = false) {
|
|
|
if (!type) {
|
|
|
- if (!this.chooseList.every(item => item || item === 0)) {
|
|
|
- return (this.submitState = 1)
|
|
|
+ for (let i = 0; i < this.chooseList.length; i++) {
|
|
|
+ if (this.chooseList[i] === undefined) return (this.submitState = 1)
|
|
|
}
|
|
|
}
|
|
|
let paperScore = 0
|
|
@@ -119,9 +119,9 @@ export default {
|
|
|
paperDuration,
|
|
|
paperScore,
|
|
|
questionWrong: JSON.stringify(questionWrong),
|
|
|
- userId: 7
|
|
|
+ userId: 6
|
|
|
},
|
|
|
- userId: 7
|
|
|
+ userId: 6
|
|
|
}).then(r => {
|
|
|
this.submitState = 2
|
|
|
clearInterval(this.timer)
|
|
@@ -338,8 +338,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
.bounced {
|
|
|
- width: 300px;
|
|
|
- height: 300px;
|
|
|
+ width: 340px;
|
|
|
+ height: 340px;
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
|
left: 50%;
|
|
@@ -349,13 +349,13 @@ export default {
|
|
|
align-items: center;
|
|
|
|
|
|
>img {
|
|
|
- padding: 48px 0 24px 0;
|
|
|
+ padding: 63px 0 34px 0;
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
|
|
|
&-message {
|
|
|
- margin-bottom: 28px;
|
|
|
+ margin-bottom: 33px;
|
|
|
font-size: 18px;
|
|
|
font-weight: 500;
|
|
|
color: #161616;
|