Commit 67b44efa by 陆志强

Merge branch 'feature/question' into test

parents 89f81cc2 42b8da16
......@@ -173,21 +173,22 @@ export default {
}
},
submitAnswer(data) {
if (this.info.question.options[Number(this.answer)].isRight) {
this.$toast('回答正确!点击抽奖进行抽奖')
} else {
this.$toast('回答错误!谢谢参与')
}
saveAnswer(data).then((res) => {
if (res.code === 200 && res.errorCode === 0) {
if (this.info.question.options[Number(this.answer)].isRight) {
this.$toast('回答正确!点击抽奖进行抽奖')
} else {
this.$toast('回答错误!谢谢参与')
}
this.info.answerStatus = 1
Bus.$emit('LotteryInfoUpdate', {
id: this.$route.query.id,
playId: this.$route.query.sessionId,
})
setTimeout(() => {
if (this.$route.query.backUrl) {
window.location.href = this.$route.query.backUrl
}
Bus.$emit('LotteryInfoUpdate', {
id: this.$route.query.id,
playId: this.$route.query.sessionId,
})
}, 1500)
} else {
this.$toast(res.errorMessage)
......
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 sign in to comment