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
e908bd76
Commit
e908bd76
authored
Apr 10, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
818acc64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
16 deletions
+13
-16
complete-head.module.scss
src/pages/game/complete/components/complete-head.module.scss
+3
-3
short-cut.module.scss
src/pages/main/components/short-cut.module.scss
+1
-1
short-cut.tsx
src/pages/main/components/short-cut.tsx
+8
-11
scene-5.tsx
src/pages/main/guide/scene-5.tsx
+1
-1
No files found.
src/pages/game/complete/components/complete-head.module.scss
View file @
e908bd76
...
...
@@ -63,7 +63,7 @@
align-items
:
center
;
justify-content
:
center
;
animation-name
:
fadeInUp
;
animation-duration
:
.
5
s
;
animation-duration
:
.
3
s
;
animation-timing-function
:
ease-out
;
animation-fill-mode
:
backwards
;
animation-iteration-count
:
1
;
...
...
@@ -72,10 +72,10 @@
animation-delay
:
0
;
}
&
:nth-child
(
2
)
{
animation-delay
:
.
3
s
;
animation-delay
:
.
2
s
;
}
&
:nth-child
(
3
)
{
animation-delay
:
.
6
s
;
animation-delay
:
.
4
s
;
}
}
...
...
src/pages/main/components/short-cut.module.scss
View file @
e908bd76
...
...
@@ -18,7 +18,7 @@
transition
:
all
ease-out
.3s
;
transform
:
translateY
(
0px
);
&
.is
Show
{
&
.is
_hide
{
opacity
:
0
;
pointer-events
:
none
;
transform
:
translateY
(
-30px
);
...
...
src/pages/main/components/short-cut.tsx
View file @
e908bd76
...
...
@@ -13,10 +13,9 @@ type ShortCutProps = {
}
const
ShortCut
=
(
props
:
ShortCutProps
)
=>
{
const
[
is
Show
,
setIsShow
]
=
useState
(
true
)
const
[
is
Hide
,
setIsHide
]
=
useState
(
true
)
const
[
isDown
,
setIsDown
]
=
useState
(
false
)
const
scrollRef
=
useRef
(
0
)
const
lastEffectedScroll
=
useRef
(
0
)
const
stageList
=
useStoreState
(
state
=>
state
.
mainModel
.
stageList
)
usePageScroll
((
payload
)
=>
{
...
...
@@ -27,18 +26,16 @@ const ShortCut = (props: ShortCutProps) => {
if
(
!
stageList
.
some
(
c
=>
c
.
status
===
StageStatus
.
CURRENT
))
{
return
}
lastEffectedScroll
.
current
=
scrollRef
.
current
// @ts-ignore
let
observer
=
createIntersectionObserver
()
observer
.
relativeToViewport
({
bottom
:
0
})
.
observe
(
`#
${
CurrentRoundId
}
`
,
({
intersectionRatio
})
=>
{
const
show
=
intersectionRatio
>
0
setIsShow
(
show
)
.
observe
(
`#
${
CurrentRoundId
}
`
,
(
res
)
=>
{
const
{
intersectionRatio
,
boundingClientRect
}
=
res
const
hide
=
intersectionRatio
>
0
setIsHide
(
hide
)
setIsDown
(
lastEffectedScroll
.
current
<
scrollRef
.
current
)
lastEffectedScroll
.
current
=
scrollRef
.
current
setIsDown
(
boundingClientRect
.
top
<
0
)
})
return
()
=>
{
...
...
@@ -51,9 +48,9 @@ const ShortCut = (props: ShortCutProps) => {
return
(
<
View
className=
{
styles
.
shortcut
}
>
<
View
className=
{
classNames
(
styles
.
shortcutInner
,
is
Show
&&
styles
.
isShow
)
}
onClick=
{
props
.
onClick
}
>
<
View
className=
{
classNames
(
styles
.
shortcutInner
,
is
Hide
&&
styles
.
is_hide
)
}
onClick=
{
props
.
onClick
}
>
<
Image
src=
{
assets
[
'short-cut-bg.png'
].
u
}
className=
{
styles
.
bg
}
></
Image
>
<
Image
src=
{
assets
[
'short-cut-arrow.png'
].
u
}
className=
{
classNames
(
styles
.
arrow
,
((
!
is
Show
&&
isDown
)
||
(
isShow
&&
!
isDown
))
&&
styles
.
isDown
)
}
></
Image
>
<
Image
src=
{
assets
[
'short-cut-arrow.png'
].
u
}
className=
{
classNames
(
styles
.
arrow
,
((
!
is
Hide
&&
isDown
)
||
(
isHide
&&
!
isDown
))
&&
styles
.
isDown
)
}
></
Image
>
</
View
>
</
View
>
)
...
...
src/pages/main/guide/scene-5.tsx
View file @
e908bd76
...
...
@@ -41,7 +41,7 @@ const Scene5 = (props: Scene5Props) => {
<
Text
>
各类题型,已经为你准备好啦。我这个数学大师不错吧!
</
Text
>
)
:
(
<
Text
>
请问同学有哪些
<
Text
className=
{
styles
.
em
}
>
计算问题
</
Text
>
需要提高呢
?
<
Text
className=
{
styles
.
select
}
>
多选
</
Text
></
Text
>
<
Text
>
请问同学有哪些
<
Text
className=
{
styles
.
em
}
>
计算问题
</
Text
>
需要提高呢
?
<
Text
className=
{
styles
.
select
}
>
多选
</
Text
></
Text
>
)
}
</
View
>
{
isSubmit
&&
(
...
...
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