Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeekLearnMathWeapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
GeekLearnMathWeapp
Commits
e7445d0f
Commit
e7445d0f
authored
Apr 05, 2023
by
m
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://118.24.71.244/hewenhao/GeekLearnMathWeapp
parents
d985c18d
cdb99eb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
header.tsx
src/pages/main/components/header.tsx
+11
-3
index.tsx
src/pages/prepare/index.tsx
+3
-3
No files found.
src/pages/main/components/header.tsx
View file @
e7445d0f
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
>
...
...
src/pages/prepare/index.tsx
View file @
e7445d0f
import
{
View
,
Text
,
Image
}
from
'@tarojs/components'
import
{
View
,
Text
,
Image
}
from
'@tarojs/components'
import
{
useEffect
,
useMemo
,
useState
}
from
'react'
import
{
useEffect
,
useMemo
,
useState
}
from
'react'
import
{
useRouter
,
getMenuButtonBoundingClientRect
,
useShareAppMessage
,
navigateTo
}
from
'@tarojs/taro'
import
{
useRouter
,
useDidShow
,
getMenuButtonBoundingClientRect
,
useShareAppMessage
,
navigateTo
}
from
'@tarojs/taro'
import
classNames
from
'classnames'
import
classNames
from
'classnames'
import
Button
from
'@/components/Button'
import
Button
from
'@/components/Button'
...
@@ -67,9 +67,9 @@ const Prepare = () => {
...
@@ -67,9 +67,9 @@ const Prepare = () => {
}
}
},
[
nav
.
height
,
nav
.
top
])
},
[
nav
.
height
,
nav
.
top
])
use
Effect
(()
=>
{
use
DidShow
(()
=>
{
getStageDetail
(
+
router
.
params
.
id
||
1
)
getStageDetail
(
+
router
.
params
.
id
||
1
)
}
,
[
router
,
getStageDetail
]
)
})
useShareAppMessage
(()
=>
{
useShareAppMessage
(()
=>
{
return
{
return
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment