Commit 14a7dd47 authored by hewenhao's avatar hewenhao

feat: update

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