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
97841175
Commit
97841175
authored
Jun 16, 2023
by
raca
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/2023-06-12-v1.1' of…
Merge branch 'feature/2023-06-12-v1.1' of
https://118.24.71.244/hewenhao/GeekLearnMathWeapp
into feature/2023-06-12-v1.1
parents
5367faf4
15a5d29b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
battle-complete.tsx
src/pages/game/play/components/battle-complete.tsx
+14
-10
types.ts
src/pages/game/play/model/types.ts
+4
-1
index.tsx
src/pages/main/components/tutorial/index.tsx
+4
-1
No files found.
src/pages/game/play/components/battle-complete.tsx
View file @
97841175
...
@@ -3,16 +3,20 @@ import assetsGame from '@/assets/oss/assets-game'
...
@@ -3,16 +3,20 @@ import assetsGame from '@/assets/oss/assets-game'
import
assetsPrepare
from
'@/assets/oss/assets-prepare'
import
assetsPrepare
from
'@/assets/oss/assets-prepare'
import
assetsPk
from
'@/assets/oss/assets-pk'
import
assetsPk
from
'@/assets/oss/assets-pk'
import
classNames
from
'classnames'
import
classNames
from
'classnames'
import
{
reLaunch
}
from
'@tarojs/taro'
import
{
useStoreState
}
from
'@/store/hooks'
import
{
useStoreState
}
from
'@/store/hooks'
import
styles
from
'./battle-complete.module.scss'
import
styles
from
'./battle-complete.module.scss'
type
BattleCompleteProps
=
{
const
BattleComplete
=
()
=>
{
}
const
BattleComplete
=
(
props
:
BattleCompleteProps
)
=>
{
const
pkResult
=
useStoreState
(
states
=>
states
.
gameModel
.
pkResult
)
const
pkResult
=
useStoreState
(
states
=>
states
.
gameModel
.
pkResult
)
const
upSelf
=
()
=>
{
reLaunch
({
url
:
'/pages/main/main'
})
}
if
(
!
pkResult
)
{
if
(
!
pkResult
)
{
return
null
return
null
}
}
...
@@ -27,30 +31,30 @@ const BattleComplete = (props: BattleCompleteProps) => {
...
@@ -27,30 +31,30 @@ const BattleComplete = (props: BattleCompleteProps) => {
</
View
>
</
View
>
<
View
className=
{
styles
.
game_role
}
>
<
View
className=
{
styles
.
game_role
}
>
<
View
className=
{
styles
.
game_role_left
}
>
<
View
className=
{
styles
.
game_role_left
}
>
<
View
className=
{
styles
.
user_name
}
>
用户名称用户名
</
View
>
<
View
className=
{
styles
.
user_name
}
>
{
pkResult
.
initiatorName
}
</
View
>
<
View
className=
{
styles
.
user_level
}
>
<
View
className=
{
styles
.
user_level
}
>
<
Image
src=
{
assetsPk
[
'bronze.png'
].
u
}
className=
{
styles
.
level_icon
}
></
Image
>
青铜Ⅰ
<
Image
src=
{
assetsPk
[
'bronze.png'
].
u
}
className=
{
styles
.
level_icon
}
></
Image
>
青铜Ⅰ
</
View
>
</
View
>
<
View
className=
{
styles
.
info
}
>
答题对错:全对
</
View
>
<
View
className=
{
styles
.
info
}
>
答题对错:全对
</
View
>
<
View
className=
{
classNames
(
styles
.
info
,
styles
.
is_info_2
)
}
>
答题用时:
21.3
s
</
View
>
<
View
className=
{
classNames
(
styles
.
info
,
styles
.
is_info_2
)
}
>
答题用时:
{
pkResult
.
initiatorResultTime
}
s
</
View
>
</
View
>
</
View
>
<
View
className=
{
classNames
(
styles
.
game_role_right
,
styles
.
is_fail
)
}
>
<
View
className=
{
classNames
(
styles
.
game_role_right
,
styles
.
is_fail
)
}
>
<
View
className=
{
styles
.
user_name
}
>
用户名称用户名
</
View
>
<
View
className=
{
styles
.
user_name
}
>
{
pkResult
.
recipientName
}
</
View
>
<
View
className=
{
styles
.
user_level
}
>
<
View
className=
{
styles
.
user_level
}
>
<
Image
src=
{
assetsPk
[
'bronze.png'
].
u
}
className=
{
styles
.
level_icon
}
></
Image
>
青铜Ⅰ
<
Image
src=
{
assetsPk
[
'bronze.png'
].
u
}
className=
{
styles
.
level_icon
}
></
Image
>
青铜Ⅰ
</
View
>
</
View
>
<
View
className=
{
styles
.
info
}
>
答题对错:
全对
</
View
>
<
View
className=
{
styles
.
info
}
>
答题对错:
{
pkResult
.
recipientErrNum
>
0
?
`错${pkResult.recipientErrNum}题`
:
'全对'
}
</
View
>
<
View
className=
{
classNames
(
styles
.
info
,
styles
.
is_info_2
)
}
>
答题用时:
21.3
s
</
View
>
<
View
className=
{
classNames
(
styles
.
info
,
styles
.
is_info_2
)
}
>
答题用时:
{
pkResult
.
recipientResultTime
}
s
</
View
>
</
View
>
</
View
>
</
View
>
</
View
>
<
View
className=
{
styles
.
gap_2
}
></
View
>
<
View
className=
{
styles
.
gap_2
}
></
View
>
<
View
className=
{
styles
.
footer
}
>
<
View
className=
{
styles
.
footer
}
>
<
View
className=
{
styles
.
share
}
>
分享结果
</
View
>
<
View
className=
{
styles
.
share
}
>
分享结果
</
View
>
<
View
className=
{
styles
.
back_main
}
>
提升自己
</
View
>
<
View
className=
{
styles
.
back_main
}
onClick=
{
upSelf
}
>
提升自己
</
View
>
</
View
>
</
View
>
<
View
className=
{
styles
.
gap_3
}
></
View
>
<
View
className=
{
styles
.
gap_3
}
></
View
>
</
View
>
</
View
>
...
...
src/pages/game/play/model/types.ts
View file @
97841175
...
@@ -2,7 +2,8 @@ import { Action, Computed, Thunk } from 'easy-peasy'
...
@@ -2,7 +2,8 @@ import { Action, Computed, Thunk } from 'easy-peasy'
import
{
AppStoreModel
}
from
'@/store/store-model'
import
{
AppStoreModel
}
from
'@/store/store-model'
import
{
import
{
type
StageDetail
,
type
StageDetail
,
type
CompleteStageOut
type
CompleteStageOut
,
type
PkResult
}
from
'@/api'
}
from
'@/api'
import
{
import
{
QuestionType
,
QuestionType
,
...
@@ -41,6 +42,8 @@ export interface GameModelState {
...
@@ -41,6 +42,8 @@ export interface GameModelState {
rightIcon
:
string
|
null
;
rightIcon
:
string
|
null
;
isBattle
:
boolean
;
isBattle
:
boolean
;
pkResult
:
PkResult
|
null
;
}
}
export
interface
GameModel
extends
GameModelState
{
export
interface
GameModel
extends
GameModelState
{
...
...
src/pages/main/components/tutorial/index.tsx
View file @
97841175
...
@@ -103,7 +103,7 @@ const Tutorial = () => {
...
@@ -103,7 +103,7 @@ const Tutorial = () => {
loadData
()
loadData
()
preloadGuideImages
()
preloadGuideImages
()
}
}
if
(
isLoadRef
.
current
||
stageList
.
length
<
1
)
{
if
(
isLoadRef
.
current
)
{
return
return
}
}
isLoadRef
.
current
=
true
isLoadRef
.
current
=
true
...
@@ -115,6 +115,9 @@ const Tutorial = () => {
...
@@ -115,6 +115,9 @@ const Tutorial = () => {
}
else
{
}
else
{
setStep
(
0
)
setStep
(
0
)
// 只有第一关才有
// 只有第一关才有
if
(
stageList
.
length
<
1
)
{
return
}
const
index
=
stageList
.
findIndex
(
c
=>
c
.
status
===
StageStatus
.
CURRENT
)
const
index
=
stageList
.
findIndex
(
c
=>
c
.
status
===
StageStatus
.
CURRENT
)
if
(
!
isMainGuideComplete
&&
index
===
0
)
{
if
(
!
isMainGuideComplete
&&
index
===
0
)
{
updateGuideActive
(
true
)
updateGuideActive
(
true
)
...
...
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