Commit 165d1ca6 authored by hewenhao's avatar hewenhao

feat: 新接口

parent 14b6325e
...@@ -2,7 +2,7 @@ import { action, computed, thunk } from 'easy-peasy' ...@@ -2,7 +2,7 @@ import { action, computed, thunk } from 'easy-peasy'
import { import {
getQuestionList, StageLevel, getQuestionList, StageLevel,
getStageDetail, completeStage, StageType, getStageDetail, completeStage, StageType,
resumeGame, getPkDetail resumeGame, fetchUserDetails
} from '@/api' } from '@/api'
import { import {
showLoading, hideLoading, showModal, redirectTo, showLoading, hideLoading, showModal, redirectTo,
...@@ -61,7 +61,7 @@ const gameModel: GameModel = { ...@@ -61,7 +61,7 @@ const gameModel: GameModel = {
getPkDetail: thunk(async (actions, payload) => { getPkDetail: thunk(async (actions, payload) => {
try { try {
const { data } = await getPkDetail(payload) const { data } = await fetchUserDetails(payload)
actions.updateState({ pkDetail: data }) actions.updateState({ pkDetail: data })
} catch (err) {} } catch (err) {}
}), }),
......
...@@ -2,7 +2,7 @@ import { Action, Computed, Thunk } from 'easy-peasy' ...@@ -2,7 +2,7 @@ import { Action, Computed, Thunk } from 'easy-peasy'
import { AppStoreModel } from '@/store/store-model' import { AppStoreModel } from '@/store/store-model'
import { import {
type StageDetail, type StageDetail,
type CompleteStageOut, PkDetail type CompleteStageOut, PkDetails
} from '@/api' } from '@/api'
import { import {
QuestionType, QuestionType,
...@@ -40,7 +40,7 @@ export interface GameModelState { ...@@ -40,7 +40,7 @@ export interface GameModelState {
rightIcon: string | null; rightIcon: string | null;
pkDetail: PkDetail | null; pkDetail: PkDetails | null;
} }
export interface GameModel extends GameModelState { export interface GameModel extends GameModelState {
......
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