Commit f70c4484 authored by hewenhao's avatar hewenhao

feat: update

parent 1e26204f
......@@ -65,6 +65,18 @@ const Prepare = () => {
}
})
const handleClick = () => {
if (cardNum < 1) {
setTrue()
} else {
getQuestionList(+router.params.id || 1).then(() => {
navigateTo({
url: `/pages/game/play/index?id=${router.params.id}`
})
})
}
}
return (
<View className={styles.wrapper}>
<TopBar />
......@@ -81,7 +93,7 @@ const Prepare = () => {
</View>
</ShareView>}
<Button type="custom" size="large" onClick={setTrue} className={styles.challenge}>
<Button type="custom" size="large" onClick={handleClick} className={styles.challenge}>
<Text className={styles.challenge_text}>开始闯关</Text>
<View className={styles.card}>
<Image className={styles.card_icon} src={require('@/pages/main/assets/ph.png')} />
......
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