Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeekLearnMathWeapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
GeekLearnMathWeapp
Commits
44a1929d
Commit
44a1929d
authored
Apr 11, 2023
by
raca
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://118.24.71.244/hewenhao/GeekLearnMathWeapp
parents
b2ba157d
8e2d9dae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
index.ts
src/pages/game/play/model/index.ts
+8
-2
No files found.
src/pages/game/play/model/index.ts
View file @
44a1929d
...
...
@@ -37,6 +37,7 @@ const startCounter = () => getCounter()?.start()
interface
GameModelState
{
/** 题目列表 */
questionList
:
QuestionType
[];
stageDetailPre
:
StageDetail
|
null
;
stageDetail
:
StageDetail
|
null
;
gameResult
:
CompleteStageDetail
|
null
;
gameStartTime
:
number
;
...
...
@@ -97,6 +98,7 @@ const gameModel: GameModel = {
rightIcon
:
null
,
stageDetail
:
null
,
stageDetailPre
:
null
,
updateState
:
action
((
state
,
obj
)
=>
{
for
(
const
key
in
obj
)
{
...
...
@@ -237,11 +239,15 @@ const gameModel: GameModel = {
}
}),
getStageDetail
:
thunk
(
async
(
actions
,
round
)
=>
{
getStageDetail
:
thunk
(
async
(
actions
,
round
,
helpers
)
=>
{
try
{
showLoading
()
let
{
stageDetail
:
pre
}
=
helpers
.
getState
()
const
{
data
:
stageDetail
}
=
await
getStageDetail
(
round
)
actions
.
updateState
({
stageDetail
})
if
(
pre
?.
id
!==
stageDetail
?.
id
)
{
pre
=
null
}
actions
.
updateState
({
stageDetail
,
stageDetailPre
:
pre
})
hideLoading
()
}
catch
(
err
)
{
hideLoading
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment