Commit 14a7dd47 authored by hewenhao's avatar hewenhao

feat: update

parent 3190e1ec
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
.avatar { .avatar {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
margin-right: 8PX;
.name { .name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
import { View, Text, Image } from '@tarojs/components' import { View, Text } from '@tarojs/components'
import styles from './chapter.module.scss' import styles from './chapter.module.scss'
...@@ -9,11 +9,11 @@ const MainHeader = () => { ...@@ -9,11 +9,11 @@ const MainHeader = () => {
<View className={styles.chapterName}> <View className={styles.chapterName}>
<Text>第 1 单元</Text> <Text>第 1 单元</Text>
</View> </View>
<View className={styles.chapterTips}><Text>单元内容名称单元内容名称单元内容名称单元内容名称</Text></View> <View className={styles.chapterTips}><Text>二年级下·上半学期</Text></View>
</View> </View>
<View className={styles.help} hoverClass={styles['is-hover-btn']}> {/* <View className={styles.help} hoverClass={styles['is-hover-btn']}>
<Image src={require('../assets/help.png')} className={styles.icon}></Image> <Image src={require('../assets/help.png')} className={styles.icon}></Image>
</View> </View> */}
</View> </View>
) )
} }
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
.avatar { .avatar {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
margin-right: 8PX;
.name { .name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -55,9 +55,12 @@ const MainPage = () => { ...@@ -55,9 +55,12 @@ const MainPage = () => {
scrollToCurrent(() => { scrollToCurrent(() => {
updateReady(true) updateReady(true)
}) })
setTimeout(() => {
updateReady(true)
}, 300)
} }
}) })
}, 500) }, 200)
}) })
} }
}, [isFocus, fetchAccount, fetchStage, page, scrollToCurrent, updateReady]) }, [isFocus, fetchAccount, fetchStage, page, scrollToCurrent, updateReady])
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.roundName { .roundName {
// position: absolute; // position: absolute;
// bottom: -48px; // bottom: -48px;
margin: 8px -20px 0 -20px; margin: 8px -160px 0 -160px;
text-align: center; text-align: center;
font-size: 28px; font-size: 28px;
font-weight: 500; font-weight: 500;
......
...@@ -25,20 +25,20 @@ const ExchangeItems: ExchangeGoods[] = [ ...@@ -25,20 +25,20 @@ const ExchangeItems: ExchangeGoods[] = [
{ {
title: '答题卡', title: '答题卡',
subTitle: '答题卡', subTitle: '答题卡',
description: '答题卡是不断追求更高档位与排名的必备道具答题卡是不断追求更高档位与排名的必备道具', description: '答题卡是不断追求更高档位与排名的必备道具',
price: 30, price: 30,
stock: null, stock: null,
img: require('./assets/ph.png'), img: require('./assets/ph.png'),
}, },
{ // {
title: '月度神秘大礼', // title: '月度神秘大礼',
subTitle: '神秘大礼', // subTitle: '神秘大礼',
description: '兑换神秘大礼,线下领取超级大礼', // description: '兑换神秘大礼,线下领取超级大礼',
price: 30, // price: 30,
stock: 10, // stock: 10,
img: require('./assets/gift.png'), // img: require('./assets/gift.png'),
} // }
] ]
const StudyMarket = () => { const StudyMarket = () => {
......
import { View, Text, Image } from '@tarojs/components' import { View, Text, Image } from '@tarojs/components'
import { useMemo, useState, useEffect, useCallback } from 'react' import { useMemo, useState, useEffect, useCallback, useRef } from 'react'
import { useRouter, redirectTo, getMenuButtonBoundingClientRect, useShareAppMessage, navigateTo, showLoading, hideLoading, useDidShow } from '@tarojs/taro' import { useRouter, redirectTo, getMenuButtonBoundingClientRect, useShareAppMessage, navigateTo, showLoading, hideLoading, useDidShow } from '@tarojs/taro'
import classNames from 'classnames' import classNames from 'classnames'
...@@ -23,6 +23,7 @@ import styles from './index.module.scss' ...@@ -23,6 +23,7 @@ import styles from './index.module.scss'
const Prepare = () => { const Prepare = () => {
const nav = useMemo(getMenuButtonBoundingClientRect, []) const nav = useMemo(getMenuButtonBoundingClientRect, [])
const router = useRouter<{ id: string }>() const router = useRouter<{ id: string }>()
const isClickRef = useRef(false)
const [currentTab, setCurrentTab] = useState(0) const [currentTab, setCurrentTab] = useState(0)
const [isVisible, { setTrue, setFalse }] = useBoolean(false) const [isVisible, { setTrue, setFalse }] = useBoolean(false)
const [isLoad, { toggle: toggleLoad }] = useBoolean(true) const [isLoad, { toggle: toggleLoad }] = useBoolean(true)
...@@ -85,8 +86,8 @@ const Prepare = () => { ...@@ -85,8 +86,8 @@ const Prepare = () => {
const { run: exchange, loading: spinning } = useRequest(pointToCard, { const { run: exchange, loading: spinning } = useRequest(pointToCard, {
immediate: false, immediate: false,
onSuccess: () => { onSuccess: () => {
setFalse()
getQuestionList(+router.params.id || 1).then(() => { getQuestionList(+router.params.id || 1).then(() => {
setFalse()
navigateTo({ navigateTo({
url: `/pages/game/play/index?id=${router.params.id}` url: `/pages/game/play/index?id=${router.params.id}`
}) })
...@@ -98,7 +99,10 @@ const Prepare = () => { ...@@ -98,7 +99,10 @@ const Prepare = () => {
if (cardNum < 1 && !stageDetail?.firstTime) { if (cardNum < 1 && !stageDetail?.firstTime) {
setTrue() setTrue()
} else { } else {
if (isClickRef.current) return
isClickRef.current = true
getQuestionList(+router.params.id || 1).then(() => { getQuestionList(+router.params.id || 1).then(() => {
isClickRef.current = false
navigateTo({ navigateTo({
url: `/pages/game/play/index?id=${router.params.id}` url: `/pages/game/play/index?id=${router.params.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