Commit d3061f51 authored by hewenhao's avatar hewenhao

feat: update

parent 1bde3df8
...@@ -4,6 +4,7 @@ import classNames from 'classnames' ...@@ -4,6 +4,7 @@ import classNames from 'classnames'
import { cs } from '@/styles' import { cs } from '@/styles'
import { navigateTo } from '@tarojs/taro' import { navigateTo } from '@tarojs/taro'
import type { ImageSource } from '@/types' import type { ImageSource } from '@/types'
import { useStoreActions } from '@/store/hooks'
import { type Stage, StageType, StageStatus, StageLevel, CurrentRoundId, SceneContext } from './constants' import { type Stage, StageType, StageStatus, StageLevel, CurrentRoundId, SceneContext } from './constants'
import StageTag from './stage-tag' import StageTag from './stage-tag'
...@@ -103,6 +104,7 @@ const getIconClassNames = (type?: StageType, extra: string[] = []) => { ...@@ -103,6 +104,7 @@ const getIconClassNames = (type?: StageType, extra: string[] = []) => {
const StageComp = (props: StageProps) => { const StageComp = (props: StageProps) => {
const { stage } = props const { stage } = props
const updateState = useStoreActions(actions => actions.gameModel.updateState)
const renderRound = (ready: boolean) => { const renderRound = (ready: boolean) => {
switch (stage.status) { switch (stage.status) {
...@@ -143,6 +145,8 @@ const StageComp = (props: StageProps) => { ...@@ -143,6 +145,8 @@ const StageComp = (props: StageProps) => {
const handleClick = () => { const handleClick = () => {
if (stage.status !== StageStatus.DISABLED) { if (stage.status !== StageStatus.DISABLED) {
/** 从首页进入更新状态 */
updateState({ isSubmit: false })
navigateTo({ url: `/pages/prepare/index?id=${stage.id}` }) navigateTo({ url: `/pages/prepare/index?id=${stage.id}` })
} }
} }
......
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