Commit 77310b99 authored by hewenhao's avatar hewenhao

feat: update

parent 4bfa219e
...@@ -183,7 +183,7 @@ const gameModel: GameModel = { ...@@ -183,7 +183,7 @@ const gameModel: GameModel = {
if (bornTimes > 0 && cardNum > 0) { if (bornTimes > 0 && cardNum > 0) {
palyAudio(audio['错误.wav'].u) palyAudio(audio['错误.wav'].u)
stopCounter() stopCounter()
actions.updateState({ modalContinueVisible: true, bornTimes: bornTimes - 1 }) actions.updateState({ modalContinueVisible: true })
} else { } else {
actions.submit() actions.submit()
} }
...@@ -203,13 +203,13 @@ const gameModel: GameModel = { ...@@ -203,13 +203,13 @@ const gameModel: GameModel = {
}), }),
reborn: thunk(async (actions, _, helpers) => { reborn: thunk(async (actions, _, helpers) => {
const { stageDetail } = helpers.getState() const { stageDetail, bornTimes } = helpers.getState()
if (!stageDetail) return if (!stageDetail) return
try { try {
await resumeGame(stageDetail.id) await resumeGame(stageDetail.id)
helpers.getStoreActions().userModel.fetchAccount() helpers.getStoreActions().userModel.fetchAccount()
startCounter() startCounter()
actions.updateState({ modalContinueVisible: false }) actions.updateState({ modalContinueVisible: false, bornTimes: bornTimes - 1 })
} 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