Commit 06763543 authored by hewenhao's avatar hewenhao

feat: 完成页UI

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