Commit 06763543 authored by hewenhao's avatar hewenhao

feat: 完成页UI

parent ac80d7e2
import { action, Action, computed, Computed, State, Thunk, thunk } from 'easy-peasy' import { action, Action, computed, Computed, State, Thunk, thunk } from 'easy-peasy'
import { AppStoreModel } from '@/store/store-model' import { AppStoreModel } from '@/store/store-model'
import { getQuestionList, type StageDetail, getStageDetail, completeStage, StageType, type CompleteStageOut, StageLevel } from '@/api' import { getQuestionList, type StageDetail, getStageDetail, completeStage, StageType, type CompleteStageOut, StageLevel } from '@/api'
import { showLoading, hideLoading, showModal } from '@tarojs/taro' import { showLoading, hideLoading, showModal, redirectTo } from '@tarojs/taro'
import { import {
QuestionType, QuestionType,
QuestionAnswer, QuestionAnswer,
...@@ -225,6 +225,9 @@ const gameModel: GameModel = { ...@@ -225,6 +225,9 @@ const gameModel: GameModel = {
const { questionList, gameStartTime, stageDetail } = helpers.getState() const { questionList, gameStartTime, stageDetail } = helpers.getState()
const { data: gameResult } = await completeStage(buildCompleteStageParam(questionList, stageDetail!, gameStartTime)) const { data: gameResult } = await completeStage(buildCompleteStageParam(questionList, stageDetail!, gameStartTime))
actions.updateState({ gameResult }) actions.updateState({ gameResult })
redirectTo({
url: '/pages/game/complete/index',
})
} catch (err) { } catch (err) {
showModal({ showModal({
title: '提示', title: '提示',
......
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