Commit cdb99eb2 authored by hewenhao's avatar hewenhao

feat: 跳转学分小店

parent 46e37e29
import { View, Text, Image } from '@tarojs/components' import { View, Text, Image } from '@tarojs/components'
import { getMenuButtonBoundingClientRect, getSystemInfoSync } from '@tarojs/taro' import { getMenuButtonBoundingClientRect, getSystemInfoSync, navigateTo } from '@tarojs/taro'
import { useMemo, useState } from 'react' import { useMemo, useState } from 'react'
import classNames from 'classnames'
import { useStoreState } from '@/store/hooks' import { useStoreState } from '@/store/hooks'
import { cs } from '@/styles'
import styles from './header.module.scss' import styles from './header.module.scss'
const goStore = () => {
navigateTo({
url: '/pages/market/index'
})
}
const MainHeader = () => { const MainHeader = () => {
const [nav] = useState(getMenuButtonBoundingClientRect()) const [nav] = useState(getMenuButtonBoundingClientRect())
const [sys] = useState(getSystemInfoSync()) const [sys] = useState(getSystemInfoSync())
...@@ -32,11 +40,11 @@ const MainHeader = () => { ...@@ -32,11 +40,11 @@ const MainHeader = () => {
<View className={styles.avatar}> <View className={styles.avatar}>
<Image src="https://cdn.jkwljy.com/pbb/6gkGHSsPmxc_coeGYahBkelo_2w_/96x96" className={styles.icon}></Image> <Image src="https://cdn.jkwljy.com/pbb/6gkGHSsPmxc_coeGYahBkelo_2w_/96x96" className={styles.icon}></Image>
</View> </View>
<View className={styles.score}> <View className={classNames(styles.score, cs.bounce_btn)} onClick={goStore} hoverClass={cs.bounce_btn_hover}>
<Image src={require('../assets/score.png')} className={styles.icon} /> <Image src={require('../assets/score.png')} className={styles.icon} />
<Text>{point}</Text> <Text>{point}</Text>
</View> </View>
<View className={styles.ph}> <View className={classNames(styles.ph, cs.bounce_btn)} onClick={goStore} hoverClass={cs.bounce_btn_hover}>
<Image src={require('../assets/ph.png')} className={styles.icon} /> <Image src={require('../assets/ph.png')} className={styles.icon} />
<Text>{cardNum}</Text> <Text>{cardNum}</Text>
</View> </View>
......
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