feat 存档
This commit is contained in:
@@ -122,7 +122,7 @@ export default {
|
||||
this.selectedAnswer = answer
|
||||
|
||||
try {
|
||||
const res = await api.answerQuestion(this.question.sn, answer)
|
||||
const res = await api.answerCategoryQuestion(this.question.sn, answer)
|
||||
if (res.data) {
|
||||
this.answered = true
|
||||
this.correctAnswer = res.data.answer || answer
|
||||
@@ -153,7 +153,7 @@ export default {
|
||||
|
||||
async refreshQuestion() {
|
||||
try {
|
||||
const res = await api.getQuestion(this.categorySn)
|
||||
const res = await api.getCategoryQuestion(this.categorySn)
|
||||
if (res.data) {
|
||||
if (storage.isQuestionAnswered(res.data.sn)) {
|
||||
this.refreshQuestion()
|
||||
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
|
||||
async loadQuestion() {
|
||||
try {
|
||||
const res = await api.getQuestion()
|
||||
const res = await api.getQuicklyQuestion()
|
||||
if (res.data) {
|
||||
this.question = res.data
|
||||
this.resetAnswer()
|
||||
@@ -203,7 +203,7 @@ export default {
|
||||
this.totalCount++
|
||||
|
||||
try {
|
||||
const res = await api.answerQuestion(this.question.sn, answer)
|
||||
const res = await api.answerQuicklyQuestion(this.question.sn, answer)
|
||||
if (res.data) {
|
||||
this.correctAnswer = res.data.answer || answer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user