Commit e6f1d38a by 陆志强

feat: 更改答题状态

parent 8d7d59a1
...@@ -173,13 +173,14 @@ export default { ...@@ -173,13 +173,14 @@ export default {
} }
}, },
submitAnswer(data) { submitAnswer(data) {
if (this.info.question.options[Number(this.answer)].isRight) {
this.$toast('回答正确!点击抽奖进行抽奖')
} else {
this.$toast('回答错误!谢谢参与')
}
saveAnswer(data).then((res) => { saveAnswer(data).then((res) => {
if (res.code === 200 && res.errorCode === 0) { 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
setTimeout(() => { setTimeout(() => {
if (this.$route.query.backUrl) { if (this.$route.query.backUrl) {
window.location.href = this.$route.query.backUrl window.location.href = this.$route.query.backUrl
......
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