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
00c1f076
Commit
00c1f076
authored
Apr 11, 2023
by
raca
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://118.24.71.244/hewenhao/GeekLearnMathWeapp
parents
a1dc7a5a
8343537b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
complete-head.tsx
src/pages/game/complete/components/complete-head.tsx
+17
-1
No files found.
src/pages/game/complete/components/complete-head.tsx
View file @
00c1f076
...
@@ -27,6 +27,22 @@ const getLevelBigBg = (s?: StageLevel | null): string => {
...
@@ -27,6 +27,22 @@ const getLevelBigBg = (s?: StageLevel | null): string => {
return
assets
[
'level-big-fail.png'
].
u
return
assets
[
'level-big-fail.png'
].
u
}
}
const
getWeight
=
(
s
?:
StageLevel
|
null
)
=>
{
switch
(
s
)
{
case
StageLevel
.
S
:
{
return
100
}
case
StageLevel
.
A
:
{
return
50
}
case
StageLevel
.
B
:
{
return
25
}
}
return
0
}
const
getAudioSrc
=
(
s
?:
StageLevel
|
null
)
=>
{
const
getAudioSrc
=
(
s
?:
StageLevel
|
null
)
=>
{
if
(
!
s
)
{
if
(
!
s
)
{
return
audio
[
'闯关失败.wav'
].
u
return
audio
[
'闯关失败.wav'
].
u
...
@@ -111,7 +127,7 @@ const GameCompleteHead = () => {
...
@@ -111,7 +127,7 @@ const GameCompleteHead = () => {
const
text
=
useMemo
(()
=>
{
const
text
=
useMemo
(()
=>
{
const
{
text
:
_text
,
second
,
color
}
=
getLevelText
(
gameResult
?.
level
)
const
{
text
:
_text
,
second
,
color
}
=
getLevelText
(
gameResult
?.
level
)
if
(
g
ameResult
?.
levelBefore
!==
gameResult
?.
level
)
{
if
(
g
etWeight
(
gameResult
?.
levelBefore
)
<
getWeight
(
gameResult
?.
level
)
)
{
return
{
text
:
second
,
color
}
return
{
text
:
second
,
color
}
}
}
return
{
text
:
_text
,
color
}
return
{
text
:
_text
,
color
}
...
...
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