Commit dcc86a67 authored by hewenhao's avatar hewenhao

feat: update

parent 5361e814
......@@ -212,27 +212,22 @@ const gameModel: GameModel = {
getQuestionList: thunk(async (actions, round) => {
try {
showLoading()
const [{ data: questionList }, { data: stageDetail }] = await Promise.all([
getQuestionList(round),
getStageDetail(round)
])
const { data: questionList } = await getQuestionList(round)
actions.updateState({
questionList: questionList.map(convertQuestion),
stageDetail,
gameStartTime: Date.now(),
})
hideLoading()
} catch (err) {
hideLoading()
showModal({
title: '提示',
content: err.message || '出错了',
showCancel: false,
})
actions.updateState({
questionList: [],
stageDetail: null
})
} finally {
hideLoading()
}
}),
......
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