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
8c96aec7
Commit
8c96aec7
authored
Jun 15, 2023
by
raca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: pk战报pk弹窗
parent
31a1d45a
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
337 additions
and
67 deletions
+337
-67
.gitignore
.gitignore
+1
-0
settings.json
.vscode/settings.json
+5
-0
app.config.ts.tpl
scripts/app.config.ts.tpl
+1
-1
index.module.scss
src/components/Modal/index.module.scss
+1
-1
index.tsx
src/components/Modal/index.tsx
+1
-1
battles-modal.module.scss
src/pages/battles/components/battles-modal.module.scss
+117
-0
battles-modal.tsx
src/pages/battles/components/battles-modal.tsx
+124
-0
game-result.module.scss
src/pages/battles/components/game-result.module.scss
+31
-30
game-result.tsx
src/pages/battles/components/game-result.tsx
+23
-21
player-details.module.scss
src/pages/battles/components/player-details.module.scss
+0
-0
player-details.tsx
src/pages/battles/components/player-details.tsx
+0
-0
top-header.module.scss
src/pages/battles/components/top-header.module.scss
+0
-0
top-header.tsx
src/pages/battles/components/top-header.tsx
+0
-0
const.ts
src/pages/battles/const.ts
+0
-0
index.config.ts
src/pages/battles/index.config.ts
+0
-0
index.module.scss
src/pages/battles/index.module.scss
+5
-4
index.tsx
src/pages/battles/index.tsx
+8
-8
model.ts
src/pages/battles/model.ts
+15
-0
main-component.tsx
src/pages/main/main-underground/main-component.tsx
+2
-0
store-model.ts
src/store/store-model.ts
+3
-1
No files found.
.gitignore
View file @
8c96aec7
...
@@ -16,3 +16,4 @@ _testing
...
@@ -16,3 +16,4 @@ _testing
/qr_output
/qr_output
/gen-mini-qr.js
/gen-mini-qr.js
.prettierrc
.vscode/settings.json
0 → 100644
View file @
8c96aec7
{
"prettier.singleQuote"
:
true
,
"prettier.semi"
:
false
}
\ No newline at end of file
scripts/app.config.ts.tpl
View file @
8c96aec7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
export default {
export default {
pages: [
pages: [
'pages/main/main',
'pages/main/main',
'pages/
pk
/index',
'pages/
battles
/index',
'pages/prepare/index',
'pages/prepare/index',
'pages/group/index',
'pages/group/index',
'pages/market/index',
'pages/market/index',
...
...
src/components/Modal/index.module.scss
View file @
8c96aec7
.wrapper
{
.wrapper
{
position
:
fixed
;
position
:
fixed
;
text-align
:
center
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
...
@@ -29,7 +30,6 @@
...
@@ -29,7 +30,6 @@
.header
{
.header
{
border-radius
:
32px
32px
0px
0px
;
border-radius
:
32px
32px
0px
0px
;
background-color
:
#465164
;
background-color
:
#465164
;
text-align
:
center
;
height
:
88px
;
height
:
88px
;
line-height
:
88px
;
line-height
:
88px
;
position
:
relative
;
position
:
relative
;
...
...
src/components/Modal/index.tsx
View file @
8c96aec7
...
@@ -5,7 +5,7 @@ import EyeProtectionView from '../EyeProtectionView'
...
@@ -5,7 +5,7 @@ import EyeProtectionView from '../EyeProtectionView'
import
styles
from
'./index.module.scss'
import
styles
from
'./index.module.scss'
interface
ModalProps
{
interface
ModalProps
{
tilte
?:
string
;
tilte
?:
string
|
React
.
ReactNode
;
isVisible
:
boolean
;
isVisible
:
boolean
;
wrapClassName
?:
string
;
wrapClassName
?:
string
;
bodyClassName
?:
string
;
bodyClassName
?:
string
;
...
...
src/pages/battles/components/battles-modal.module.scss
0 → 100644
View file @
8c96aec7
.modalWrap
{
text-align
:
left
;
}
.modalBody
{
background-color
:
#465164
;
margin-top
:
-32px
;
border-bottom-left-radius
:
32px
;
border-bottom-right-radius
:
32px
;
}
.inner
{
background
:
#FFFFFF
;
border-radius
:
24px
;
padding
:
24px
20px
;
}
.badgeIcon
{
width
:
240px
;
height
:
240px
;
}
.badgeText
{
font-weight
:
600
;
}
.badgeBar
{
display
:
flex
;
gap
:
3
PX
;
.badgeBarItem
{
width
:
80px
;
height
:
20px
;
background-color
:
#F0F2F9
;
border-radius
:
16px
;
}
.active
{
background-color
:
#FFC056
;
}
}
.details
{
display
:
flex
;
gap
:
32px
;
padding
:
0
24px
;
align-items
:
center
;
}
.detailsRight
{
display
:
flex
;
flex-direction
:
column
;
gap
:
16px
;
justify-content
:
center
;
}
.header
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
gap
:
8px
;
}
.line
{
display
:
flex
;
gap
:
4
PX
;
flex-direction
:
column
;
.lineLong
,
.lineShort
{
height
:
3
PX
;
background
:
#D9E3F3
;
border-radius
:
2
PX
;
}
.lineLong
{
width
:
132px
;
}
.lineShort
{
width
:
32px
;
}
}
.gameResult
{
display
:
flex
;
flex-direction
:
column
;
gap
:
16px
;
max-height
:
500px
;
overflow
:
auto
;
padding-right
:
24px
;
}
.gameBody
{
background-color
:
#fff
;
}
.playerSection
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
.userInfo
:first-child
{
border-bottom-left-radius
:
20px
;
}
.userInfo
:last-child
{
border-bottom-right-radius
:
20px
;
}
}
.userInfo
{
flex
:
1
;
padding
:
24px
30px
;
}
.win
{
background-color
:
#E5F4FE
;
}
.lose
{
background-color
:
#FEEDED
;
}
\ No newline at end of file
src/pages/battles/components/battles-modal.tsx
0 → 100644
View file @
8c96aec7
import
{
View
,
Text
,
Image
}
from
'@tarojs/components'
import
classNames
from
'classnames'
import
Modal
from
'@/components/Modal'
import
{
useStoreState
,
useStoreActions
}
from
'@/store/hooks'
import
assets
from
'@/assets/oss/assets-pk'
import
{
badgeImages
}
from
'../const'
import
{
UserInfo
,
GameResultProps
}
from
'./game-result'
import
styles
from
'./battles-modal.module.scss'
import
gameResultStyles
from
'./game-result.module.scss'
const
BattlesModal
=
()
=>
{
const
isVisible
=
useStoreState
(
state
=>
state
.
battlesModel
.
modalIsVisible
)
const
setModalIsVisible
=
useStoreActions
(
actions
=>
actions
.
battlesModel
.
setModalIsVisible
)
const
levelInfo
=
{
name
:
'关卡'
,
result
:
true
,
date
:
'9月22日 12:22'
,
}
const
levelInfo2
=
{
name
:
'关卡名称关卡名称'
,
result
:
false
,
date
:
'9月22日 12:22'
,
}
const
players
=
[
{
name
:
'用户名称用'
,
icon
:
'string'
,
level
:
'青铜Ⅰ'
,
},
{
name
:
'用户2'
,
icon
:
'string'
,
level
:
'青铜Ⅰ'
,
},
]
return
(
<
Modal
isVisible=
{
isVisible
}
wrapClassName=
{
styles
.
modalWrap
}
bodyClassName=
{
styles
.
modalBody
}
onClose=
{
()
=>
setModalIsVisible
(
false
)
}
tilte=
{
<
Text
style=
{
{
marginLeft
:
10
}
}
>
· PK 战报
</
Text
>
}
>
<
View
className=
{
styles
.
inner
}
>
<
View
className=
{
styles
.
header
}
>
<
View
className=
{
styles
.
line
}
style=
{
{
alignItems
:
'flex-end'
}
}
>
<
Text
className=
{
styles
.
lineLong
}
></
Text
>
<
Text
className=
{
styles
.
lineShort
}
></
Text
>
</
View
>
<
Text
>
当前段位
</
Text
>
<
View
className=
{
styles
.
line
}
>
<
Text
className=
{
styles
.
lineLong
}
></
Text
>
<
Text
className=
{
styles
.
lineShort
}
></
Text
>
</
View
>
</
View
>
<
View
className=
{
styles
.
details
}
>
<
Image
src=
{
assets
[
badgeImages
.
bronze
.
default
].
u
}
className=
{
styles
.
badgeIcon
}
/>
<
View
className=
{
styles
.
detailsRight
}
>
<
Text
className=
{
styles
.
badgeText
}
>
青铜 1
</
Text
>
<
View
className=
{
styles
.
badgeBar
}
>
<
Text
className=
{
classNames
(
styles
.
badgeBarItem
,
styles
.
active
)
}
></
Text
>
<
Text
className=
{
classNames
(
styles
.
badgeBarItem
)
}
></
Text
>
<
Text
className=
{
classNames
(
styles
.
badgeBarItem
)
}
></
Text
>
</
View
>
</
View
>
</
View
>
<
View
className=
{
styles
.
gameResult
}
>
<
GameResult
levelInfo=
{
levelInfo
}
players=
{
players
}
/>
<
GameResult
levelInfo=
{
levelInfo2
}
players=
{
players
}
/>
<
GameResult
levelInfo=
{
levelInfo
}
players=
{
players
}
/>
<
GameResult
levelInfo=
{
levelInfo2
}
players=
{
players
}
/>
<
GameResult
levelInfo=
{
levelInfo
}
players=
{
players
}
/>
</
View
>
</
View
>
</
Modal
>
)
}
const
GameResult
=
({
players
,
levelInfo
}:
GameResultProps
)
=>
{
return
(
<
View
className=
{
gameResultStyles
.
gameResult
}
>
<
View
className=
{
classNames
(
gameResultStyles
.
levelInfo
,
levelInfo
.
result
?
gameResultStyles
.
win
:
gameResultStyles
.
lose
)
}
>
<
Text
className=
{
gameResultStyles
.
levelName
}
>
{
levelInfo
.
name
}
</
Text
>
<
Image
mode=
"widthFix"
src=
{
levelInfo
.
result
?
assets
[
'win.png'
].
u
:
assets
[
'lose.png'
].
u
}
className=
{
gameResultStyles
.
levelResult
}
/>
<
Text
className=
{
gameResultStyles
.
levelDate
}
>
{
levelInfo
.
date
}
</
Text
>
</
View
>
<
View
className=
{
styles
.
gameBody
}
>
<
View
className=
{
styles
.
playerSection
}
>
<
View
className=
{
classNames
(
styles
.
userInfo
,
levelInfo
.
result
?
styles
.
win
:
styles
.
lose
)
}
>
<
UserInfo
{
...
players
[0]}
/>
</
View
>
<
Image
className=
{
gameResultStyles
.
vs
}
src=
{
assets
[
'vs.png'
].
u
}
/>
<
View
className=
{
classNames
(
styles
.
userInfo
,
!
levelInfo
.
result
?
styles
.
win
:
styles
.
lose
)
}
>
<
UserInfo
style=
{
{
alignItems
:
'flex-end'
}
}
{
...
players
[1]}
/>
</
View
>
</
View
>
</
View
>
</
View
>
)
}
export
default
BattlesModal
src/pages/
pk
/components/game-result.module.scss
→
src/pages/
battles
/components/game-result.module.scss
View file @
8c96aec7
...
@@ -84,56 +84,57 @@
...
@@ -84,56 +84,57 @@
.gameStats
{
.gameStats
{
display
:
flex
;
display
:
flex
;
gap
:
12px
;
margin-top
:
20px
;
margin-top
:
20px
;
flex-direction
:
column
;
}
}
.statsRow
{
.stats
{
display
:
flex
;
position
:
relative
;
position
:
relative
;
justify-content
:
space-between
;
display
:
flex
;
flex-direction
:
column
;
flex
:
1
;
gap
:
16px
;
.value
{
height
:
46px
;
height
:
46px
;
line-height
:
46px
;
line-height
:
46px
;
}
.score
{
color
:
#FE4E52
;
font-weight
:
500
;
flex
:
1
;
flex
:
1
;
font-size
:
14
PX
;
font-weight
:
500
;
text-align
:
center
;
text-align
:
center
;
background-color
:
#FEEDED
;
font-size
:
28px
;
}
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
6px
;
}
.label
{
&
:nth-child
(
2
)
{
z-index
:
2
;
position
:
absolute
;
position
:
absolute
;
left
:
50%
;
left
:
50%
;
font-size
:
24px
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
text-align
:
center
;
width
:
112px
;
.value
{
font-size
:
24px
;
color
:
#fff
;
background
:
#93A0B7
;
background
:
#93A0B7
;
border-radius
:
24px
;
border-radius
:
24px
;
width
:
112px
;
}
text-align
:
center
;
}
}
}
.value
{
.statsWin
.value
{
flex
:
1
;
font-weight
:
500
;
text-align
:
center
;
font-size
:
28px
;
color
:
#009AFB
;
color
:
#009AFB
;
background-color
:
#E5F4FE
;
background-color
:
#E5F4FE
;
}
}
.statsLose
.value
{
color
:
#FE4E52
;
background-color
:
#FEEDED
;
}
.diamond
{
.diamond
{
width
:
30px
;
width
:
30px
;
height
:
30px
;
height
:
30px
;
}
}
\ No newline at end of file
.flex
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
6px
;
}
\ No newline at end of file
src/pages/
pk
/components/game-result.tsx
→
src/pages/
battles
/components/game-result.tsx
View file @
8c96aec7
...
@@ -7,7 +7,7 @@ import assets2 from '@/assets/oss/assets-prepare'
...
@@ -7,7 +7,7 @@ import assets2 from '@/assets/oss/assets-prepare'
import
{
badgeImages
}
from
'../const'
import
{
badgeImages
}
from
'../const'
import
styles
from
'./game-result.module.scss'
import
styles
from
'./game-result.module.scss'
interface
LevelInfo
{
export
interface
LevelInfo
{
name
:
string
;
name
:
string
;
result
:
boolean
;
result
:
boolean
;
date
:
string
;
date
:
string
;
...
@@ -25,7 +25,7 @@ interface Stat {
...
@@ -25,7 +25,7 @@ interface Stat {
value
:
string
;
value
:
string
;
}
}
interface
GameResultProps
{
export
interface
GameResultProps
{
levelInfo
:
LevelInfo
;
levelInfo
:
LevelInfo
;
players
:
Player
[];
players
:
Player
[];
gameStats
?:
Stat
[];
gameStats
?:
Stat
[];
...
@@ -36,7 +36,7 @@ const GameResult = ({ players, levelInfo }: GameResultProps) => {
...
@@ -36,7 +36,7 @@ const GameResult = ({ players, levelInfo }: GameResultProps) => {
<
View
className=
{
styles
.
gameResult
}
>
<
View
className=
{
styles
.
gameResult
}
>
<
View
className=
{
classNames
(
styles
.
levelInfo
,
levelInfo
.
result
?
styles
.
win
:
styles
.
lose
)
}
>
<
View
className=
{
classNames
(
styles
.
levelInfo
,
levelInfo
.
result
?
styles
.
win
:
styles
.
lose
)
}
>
<
Text
className=
{
styles
.
levelName
}
>
{
levelInfo
.
name
}
</
Text
>
<
Text
className=
{
styles
.
levelName
}
>
{
levelInfo
.
name
}
</
Text
>
<
Image
mode=
"widthFix"
src=
{
levelInfo
.
result
?
assets
[
'win.png'
].
u
:
assets
[
'lose.png'
].
u
}
className=
{
styles
.
levelResult
}
/>
<
Image
mode=
"widthFix"
src=
{
assets
[
levelInfo
.
result
?
'win.png'
:
'lose.png'
].
u
}
className=
{
styles
.
levelResult
}
/>
<
Text
className=
{
styles
.
levelDate
}
>
{
levelInfo
.
date
}
</
Text
>
<
Text
className=
{
styles
.
levelDate
}
>
{
levelInfo
.
date
}
</
Text
>
</
View
>
</
View
>
...
@@ -46,13 +46,13 @@ const GameResult = ({ players, levelInfo }: GameResultProps) => {
...
@@ -46,13 +46,13 @@ const GameResult = ({ players, levelInfo }: GameResultProps) => {
<
Image
className=
{
styles
.
vs
}
src=
{
assets
[
'vs.png'
].
u
}
/>
<
Image
className=
{
styles
.
vs
}
src=
{
assets
[
'vs.png'
].
u
}
/>
<
UserInfo
style=
{
{
alignItems
:
'flex-end'
}
}
{
...
players
[1]}
/>
<
UserInfo
style=
{
{
alignItems
:
'flex-end'
}
}
{
...
players
[1]}
/>
</
View
>
</
View
>
<
GameStats
/>
<
GameStats
result=
{
levelInfo
.
result
}
/>
</
View
>
</
View
>
</
View
>
</
View
>
)
)
}
}
const
UserInfo
=
(
player
:
Player
&
{
style
?:
CSSProperties
})
=>
(
export
const
UserInfo
=
(
player
:
Player
&
{
style
?:
CSSProperties
})
=>
(
<
View
style=
{
player
.
style
}
className=
{
styles
.
userInfo
}
>
<
View
style=
{
player
.
style
}
className=
{
styles
.
userInfo
}
>
<
Text
className=
{
styles
.
userName
}
>
{
player
.
name
}
</
Text
>
<
Text
className=
{
styles
.
userName
}
>
{
player
.
name
}
</
Text
>
<
View
className=
{
styles
.
userBadge
}
>
<
View
className=
{
styles
.
userBadge
}
>
...
@@ -62,30 +62,32 @@ const UserInfo = (player: Player & { style?: CSSProperties }) => (
...
@@ -62,30 +62,32 @@ const UserInfo = (player: Player & { style?: CSSProperties }) => (
</
View
>
</
View
>
)
)
const
GameStats
=
()
=>
(
const
GameStats
=
({
result
}:
{
result
:
boolean
})
=>
{
return
(
<
View
className=
{
styles
.
gameStats
}
>
<
View
className=
{
styles
.
gameStats
}
>
<
View
className=
{
styles
.
statsRow
}
>
<
View
className=
{
classNames
(
styles
.
stats
,
result
?
styles
.
statsWin
:
styles
.
statsLose
)
}
>
<
Text
className=
{
styles
.
score
}
>
错2题
</
Text
>
<
Text
className=
{
styles
.
label
}
>
答题对错
</
Text
>
<
Text
className=
{
styles
.
value
}
>
全队
</
Text
>
<
Text
className=
{
styles
.
value
}
>
全队
</
Text
>
</
View
>
<
Text
className=
{
styles
.
value
}
>
13.2s
</
Text
>
<
View
className=
{
styles
.
statsRow
}
>
<
View
className=
{
classNames
(
styles
.
value
)
}
>
<
Text
className=
{
styles
.
score
}
>
13.2s
</
Text
>
<
Text
className=
{
styles
.
label
}
>
答题用时
</
Text
>
<
Text
className=
{
styles
.
value
}
>
21.3s
</
Text
>
</
View
>
<
View
className=
{
styles
.
statsRow
}
>
<
View
className=
{
classNames
(
styles
.
score
,
styles
.
flex
)
}
>
<
Image
className=
{
styles
.
diamond
}
src=
{
assets2
[
'diamond.png'
].
u
}
/>
<
Image
className=
{
styles
.
diamond
}
src=
{
assets2
[
'diamond.png'
].
u
}
/>
<
Text
>
+10
</
Text
>
<
Text
>
+10
</
Text
>
</
View
>
</
View
>
<
Text
className=
{
styles
.
label
}
>
PK奖励
</
Text
>
</
View
>
<
View
className=
{
classNames
(
styles
.
value
,
styles
.
flex
)
}
>
<
View
className=
{
classNames
(
styles
.
stats
)
}
>
<
Text
className=
{
styles
.
value
}
>
答题对错
</
Text
>
<
Text
className=
{
styles
.
value
}
>
答题用时
</
Text
>
<
Text
className=
{
styles
.
value
}
>
PK奖励
</
Text
>
</
View
>
<
View
className=
{
classNames
(
styles
.
stats
,
!
result
?
styles
.
statsWin
:
styles
.
statsLose
)
}
>
<
Text
className=
{
styles
.
value
}
>
错2题
</
Text
>
<
Text
className=
{
styles
.
value
}
>
23.2s
</
Text
>
<
View
className=
{
styles
.
value
}
>
<
Image
className=
{
styles
.
diamond
}
src=
{
assets2
[
'diamond.png'
].
u
}
/>
<
Image
className=
{
styles
.
diamond
}
src=
{
assets2
[
'diamond.png'
].
u
}
/>
<
Text
>
+
5
</
Text
>
<
Text
>
+1
5
</
Text
>
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
)
)
}
export
default
GameResult
export
default
GameResult
src/pages/
pk
/components/player-details.module.scss
→
src/pages/
battles
/components/player-details.module.scss
View file @
8c96aec7
File moved
src/pages/
pk
/components/player-details.tsx
→
src/pages/
battles
/components/player-details.tsx
View file @
8c96aec7
File moved
src/pages/
pk
/components/top-header.module.scss
→
src/pages/
battles
/components/top-header.module.scss
View file @
8c96aec7
File moved
src/pages/
pk
/components/top-header.tsx
→
src/pages/
battles
/components/top-header.tsx
View file @
8c96aec7
File moved
src/pages/
pk
/const.ts
→
src/pages/
battles
/const.ts
View file @
8c96aec7
File moved
src/pages/
pk
/index.config.ts
→
src/pages/
battles
/index.config.ts
View file @
8c96aec7
File moved
src/pages/
pk
/index.module.scss
→
src/pages/
battles
/index.module.scss
View file @
8c96aec7
...
@@ -5,20 +5,20 @@
...
@@ -5,20 +5,20 @@
align-items
:
center
;
align-items
:
center
;
gap
:
16px
;
gap
:
16px
;
.
pkL
ine
{
.
l
ine
{
display
:
flex
;
display
:
flex
;
gap
:
4
PX
;
gap
:
4
PX
;
flex-direction
:
column
;
flex-direction
:
column
;
.
pkLineLong
,
.pkL
ineShort
{
.
lineLong
,
.l
ineShort
{
height
:
3
PX
;
height
:
3
PX
;
background
:
#D9E3F3
;
background
:
#D9E3F3
;
border-radius
:
2
PX
;
border-radius
:
2
PX
;
}
}
.
pkL
ineLong
{
.
l
ineLong
{
width
:
132px
;
width
:
132px
;
}
}
.
pkL
ineShort
{
.
l
ineShort
{
width
:
32px
;
width
:
32px
;
}
}
}
}
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
.bottom
{
.bottom
{
position
:
fixed
;
position
:
fixed
;
z-index
:
999
;
bottom
:
0
;
bottom
:
0
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/pages/
pk
/index.tsx
→
src/pages/
battles
/index.tsx
View file @
8c96aec7
...
@@ -34,7 +34,7 @@ const players = [
...
@@ -34,7 +34,7 @@ const players = [
}
}
]
]
const
Pk
=
()
=>
{
const
Battles
=
()
=>
{
const
nav
=
useMemo
(
getMenuButtonBoundingClientRect
,
[])
const
nav
=
useMemo
(
getMenuButtonBoundingClientRect
,
[])
return
(
return
(
<
View
style=
{
{
backgroundColor
:
'#F0F2F9'
}
}
>
<
View
style=
{
{
backgroundColor
:
'#F0F2F9'
}
}
>
...
@@ -43,14 +43,14 @@ const Pk = () => {
...
@@ -43,14 +43,14 @@ const Pk = () => {
<
PlayerDetails
/>
<
PlayerDetails
/>
<
View
className=
{
styles
.
pk
}
>
<
View
className=
{
styles
.
pk
}
>
<
View
className=
{
styles
.
pkL
ine
}
style=
{
{
alignItems
:
'flex-end'
}
}
>
<
View
className=
{
styles
.
l
ine
}
style=
{
{
alignItems
:
'flex-end'
}
}
>
<
Text
className=
{
styles
.
pkL
ineLong
}
></
Text
>
<
Text
className=
{
styles
.
l
ineLong
}
></
Text
>
<
Text
className=
{
styles
.
pkL
ineShort
}
></
Text
>
<
Text
className=
{
styles
.
l
ineShort
}
></
Text
>
</
View
>
</
View
>
<
Text
className=
{
styles
.
pkTitle
}
>
PK记录
</
Text
>
<
Text
className=
{
styles
.
pkTitle
}
>
PK记录
</
Text
>
<
View
className=
{
styles
.
pkL
ine
}
>
<
View
className=
{
styles
.
l
ine
}
>
<
Text
className=
{
styles
.
pkL
ineLong
}
></
Text
>
<
Text
className=
{
styles
.
l
ineLong
}
></
Text
>
<
Text
className=
{
styles
.
pkL
ineShort
}
></
Text
>
<
Text
className=
{
styles
.
l
ineShort
}
></
Text
>
</
View
>
</
View
>
</
View
>
</
View
>
...
@@ -68,4 +68,4 @@ const Pk = () => {
...
@@ -68,4 +68,4 @@ const Pk = () => {
)
)
}
}
export
default
Pk
export
default
Battles
src/pages/battles/model.ts
0 → 100644
View file @
8c96aec7
import
{
Action
,
action
}
from
'easy-peasy'
interface
BattlesModel
{
modalIsVisible
:
boolean
;
setModalIsVisible
:
Action
<
BattlesModel
,
boolean
>
;
}
const
battlesModel
:
BattlesModel
=
{
modalIsVisible
:
true
,
setModalIsVisible
:
action
((
state
,
payload
)
=>
{
state
.
modalIsVisible
=
payload
})
}
export
default
battlesModel
src/pages/main/main-underground/main-component.tsx
View file @
8c96aec7
...
@@ -9,6 +9,7 @@ import { useMemo, useCallback, useEffect } from 'react'
...
@@ -9,6 +9,7 @@ import { useMemo, useCallback, useEffect } from 'react'
import
{
useStoreActions
,
useStoreState
}
from
'@/store/hooks'
import
{
useStoreActions
,
useStoreState
}
from
'@/store/hooks'
import
{
useFocus
}
from
'@/hooks/use-focus'
import
{
useFocus
}
from
'@/hooks/use-focus'
import
{
EyeProtectionView
}
from
'@/components'
import
{
EyeProtectionView
}
from
'@/components'
import
BattlesModal
from
'@/pages/battles/components/battles-modal'
import
Tutorial
from
'../components/tutorial'
import
Tutorial
from
'../components/tutorial'
import
type
{
TabbarRef
}
from
'../../../custom-tab-bar/index'
import
type
{
TabbarRef
}
from
'../../../custom-tab-bar/index'
...
@@ -128,6 +129,7 @@ const MainPage = () => {
...
@@ -128,6 +129,7 @@ const MainPage = () => {
)
}
)
}
<
ShareModal
/>
<
ShareModal
/>
<
Tutorial
/>
<
Tutorial
/>
<
BattlesModal
/>
</>
</>
)
)
}
}
...
...
src/store/store-model.ts
View file @
8c96aec7
...
@@ -2,6 +2,7 @@ import gameModel from '@/pages/game/play/model'
...
@@ -2,6 +2,7 @@ import gameModel from '@/pages/game/play/model'
import
mainModel
from
'@/pages/main/model'
import
mainModel
from
'@/pages/main/model'
import
groupModel
from
'@/pages/group/model'
import
groupModel
from
'@/pages/group/model'
import
prepareModel
from
'@/pages/prepare/model'
import
prepareModel
from
'@/pages/prepare/model'
import
battlesModel
from
'@/pages/battles/model'
import
userModel
from
'./modules/user'
import
userModel
from
'./modules/user'
import
guideModel
from
'./modules/guide'
import
guideModel
from
'./modules/guide'
...
@@ -11,7 +12,8 @@ const appStoreModel = {
...
@@ -11,7 +12,8 @@ const appStoreModel = {
mainModel
,
mainModel
,
userModel
,
userModel
,
groupModel
,
groupModel
,
guideModel
guideModel
,
battlesModel
}
}
export
default
appStoreModel
export
default
appStoreModel
...
...
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