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
17208565
Commit
17208565
authored
Apr 03, 2023
by
m
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update ui
parent
7bd6a206
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
8 deletions
+40
-8
game.ts
src/api/game.ts
+1
-1
complete-head.module.scss
src/pages/game/complete/components/complete-head.module.scss
+12
-1
complete-head.tsx
src/pages/game/complete/components/complete-head.tsx
+23
-2
index.ts
src/pages/game/play/model/index.ts
+1
-1
members.module.scss
src/pages/group/components/members.module.scss
+0
-1
index.tsx
src/pages/group/index.tsx
+3
-2
No files found.
src/api/game.ts
View file @
17208565
...
...
@@ -25,7 +25,7 @@ export const enum StageType {
export
const
enum
StageLevel
{
S
=
'S'
,
A
=
'A'
,
B
=
'B'
B
=
'B'
,
}
export
interface
Stage
{
...
...
src/pages/game/complete/components/complete-head.module.scss
View file @
17208565
.head
{
background-image
:
linear-gradient
(
to
bottom
,
#B7CDEB
0%
,
#F1FAFF
87
.0301573%
,
#FFFFFF
100%
);
padding-bottom
:
64px
;
position
:
relative
;
&
.S
{
background-image
:
linear-gradient
(
to
bottom
,
#FFE4A1
0%
,
#FFFEF3
87
.0301573%
,
#FFFFFF
100%
);
}
&
.A
{
background-image
:
linear-gradient
(
to
bottom
,
#B7CDEB
0%
,
#F1FAFF
87
.0301573%
,
#FFFFFF
100%
);
}
&
.B
{
background-image
:
linear-gradient
(
to
bottom
,
#F4C09C
0%
,
#FFF7F2
87
.0301573%
,
#FFFFFF
100%
);
}
&
.fail
{
background-image
:
linear-gradient
(
to
bottom
,
#CECECE
0%
,
#F1F2F3
87
.0301573%
,
#FFFFFF
100%
);
}
}
.bg
{
...
...
src/pages/game/complete/components/complete-head.tsx
View file @
17208565
...
...
@@ -57,6 +57,19 @@ const getLevelText = (s?: StageLevel | null) => {
}
}
const
getInearGradient
=
(
s
?:
StageLevel
|
null
)
=>
{
switch
(
s
)
{
case
StageLevel
.
S
:
return
styles
.
S
case
StageLevel
.
A
:
return
styles
.
A
case
StageLevel
.
B
:
return
styles
.
B
default
:
return
styles
.
fail
}
}
const
GameCompleteHead
=
()
=>
{
const
nav
=
useMemo
(
getMenuButtonBoundingClientRect
,
[])
const
gameResult
=
useStoreState
(
state
=>
state
.
gameModel
.
gameResult
)
...
...
@@ -72,8 +85,16 @@ const GameCompleteHead = () => {
return
getLevelBigBg
(
gameResult
?.
level
)
},
[
gameResult
])
const
linearGradient
=
useMemo
(()
=>
{
return
getInearGradient
(
gameResult
?.
level
)
},
[
gameResult
])
const
text
=
useMemo
(()
=>
{
return
getLevelText
(
gameResult
?.
level
)
const
{
text
:
_text
,
second
,
color
}
=
getLevelText
(
gameResult
?.
level
)
if
(
gameResult
?.
levelBefore
!==
gameResult
?.
level
)
{
return
{
text
:
second
,
color
}
}
return
{
text
:
_text
,
color
}
},
[
gameResult
])
const
style
=
useMemo
(()
=>
{
...
...
@@ -87,7 +108,7 @@ const GameCompleteHead = () => {
}
return
(
<
View
style=
{
style
}
className=
{
styles
.
head
}
>
<
View
style=
{
style
}
className=
{
classNames
(
styles
.
head
,
linearGradient
)
}
>
<
Image
src=
{
bg
}
className=
{
styles
.
bg
}
></
Image
>
<
View
style=
{
{
color
:
text
.
color
}
}
className=
{
styles
.
tips
}
>
{
text
.
text
}
</
View
>
<
View
className=
{
styles
.
item_wrap
}
>
...
...
src/pages/game/play/model/index.ts
View file @
17208565
...
...
@@ -69,7 +69,7 @@ const gameModel: GameModel = {
upGearReward
:
40
,
errNum
:
0
,
/** 成就等级:SAB */
level
:
StageLevel
.
S
,
level
:
StageLevel
.
B
,
levelTime
:
50
,
/** 排名 */
ranks
:
[],
...
...
src/pages/group/components/members.module.scss
View file @
17208565
...
...
@@ -147,7 +147,6 @@
color
:
#fff
;
}
}
}
@supports
(
bottom
:
constant
(
safe-area-inset-bottom
))
or
(
bottom
:
env
(
safe-area-inset-bottom
))
{
.members_invite
{
...
...
src/pages/group/index.tsx
View file @
17208565
...
...
@@ -22,8 +22,9 @@ const Group = () => {
const
[
isVisible
,
{
setTrue
,
setFalse
}]
=
useBoolean
(
false
)
const
[
groupNo
,
setGroupNo
]
=
useState
<
string
>
(
''
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
const
{
tribeInfo
,
loading
}
=
useStoreState
(
state
=>
state
.
groupModel
)
const
userId
=
useStoreState
(
state
=>
state
.
userModel
.
userInfo
.
userId
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
const
tabBarHeight
=
useMemo
(()
=>
{
return
nav
.
height
+
nav
.
top
+
5
...
...
@@ -37,7 +38,7 @@ const Group = () => {
useShareAppMessage
(()
=>
{
return
{
title
:
'来看看这个有趣的页面!'
,
path
:
'/pages/main/main'
,
path
:
`pages/main/main?code=
${
userId
}
`
,
imageUrl
:
'https://picx.zhimg.com/v2-7b7b072d4bebd5ccf48c04ec1146e844_1440w.jpg?'
,
}
})
...
...
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