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
94fd1b39
Commit
94fd1b39
authored
Jul 14, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: fix skynet error
parent
6292c829
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
41 additions
and
12 deletions
+41
-12
.oss
assets/_passing-stage/.oss
+16
-0
bac-music.mp3
assets/_passing-stage/bac-music.mp3
+0
-0
draft.png
assets/_passing-stage/draft.png
+0
-0
unit-bac.png
assets/_passing-stage/unit-bac.png
+0
-0
assets-_passing-stage.ts
src/assets/oss/assets-_passing-stage.ts
+13
-0
index.tsx
src/pages/accept-pk/index.tsx
+2
-2
index.tsx
src/pages/game/battle/index.tsx
+2
-2
index.tsx
src/pages/game/play/index.tsx
+1
-1
share-modal.tsx
src/pages/main/components/share-modal.tsx
+1
-1
main.tsx
src/pages/main/main.tsx
+2
-2
scene.tsx
src/pages/prepare/guide/pk/scene.tsx
+1
-1
index.tsx
src/pages/prepare/index.tsx
+2
-2
share.ts
src/utils/share.ts
+1
-1
No files found.
assets/_passing-stage/.oss
View file @
94fd1b39
...
@@ -28,5 +28,21 @@
...
@@ -28,5 +28,21 @@
"w": 300,
"w": 300,
"h": 300,
"h": 300,
"ossName": "/passing-stage/L9YkRy6y6FfxN2c1vhdtTKMiy5r/300x300"
"ossName": "/passing-stage/L9YkRy6y6FfxN2c1vhdtTKMiy5r/300x300"
},
"draft.png": {
"u": "https://cdn.jkwljy.com/passing-stage/3e3vS9sxTzXrFPphzTf2FeEPWFhv/60x60",
"w": 60,
"h": 60,
"ossName": "/passing-stage/3e3vS9sxTzXrFPphzTf2FeEPWFhv/60x60"
},
"bac-music.mp3": {
"u": "https://cdn.jkwljy.com/passing-stage/zLfiXTuX5DtSqaNSC9gCHZ6iYD3.mp3",
"ossName": "/passing-stage/zLfiXTuX5DtSqaNSC9gCHZ6iYD3.mp3"
},
"unit-bac.png": {
"u": "https://cdn.jkwljy.com/passing-stage/4AzYFBP7atk6hCnZTyLUJw5EH7M1/750x1748",
"w": 750,
"h": 1748,
"ossName": "/passing-stage/4AzYFBP7atk6hCnZTyLUJw5EH7M1/750x1748"
}
}
}
}
assets/_passing-stage/bac-music.mp3
0 → 100644
View file @
94fd1b39
File added
assets/_passing-stage/draft.png
0 → 100644
View file @
94fd1b39
1.6 KB
assets/_passing-stage/unit-bac.png
0 → 100644
View file @
94fd1b39
135 KB
src/assets/oss/assets-_passing-stage.ts
View file @
94fd1b39
...
@@ -25,5 +25,18 @@ export default {
...
@@ -25,5 +25,18 @@ export default {
"u"
:
"https://cdn.jkwljy.com/passing-stage/L9YkRy6y6FfxN2c1vhdtTKMiy5r/300x300"
,
"u"
:
"https://cdn.jkwljy.com/passing-stage/L9YkRy6y6FfxN2c1vhdtTKMiy5r/300x300"
,
"w"
:
300
,
"w"
:
300
,
"h"
:
300
"h"
:
300
},
"draft.png"
:
{
"u"
:
"https://cdn.jkwljy.com/passing-stage/3e3vS9sxTzXrFPphzTf2FeEPWFhv/60x60"
,
"w"
:
60
,
"h"
:
60
},
"bac-music.mp3"
:
{
"u"
:
"https://cdn.jkwljy.com/passing-stage/zLfiXTuX5DtSqaNSC9gCHZ6iYD3.mp3"
},
"unit-bac.png"
:
{
"u"
:
"https://cdn.jkwljy.com/passing-stage/4AzYFBP7atk6hCnZTyLUJw5EH7M1/750x1748"
,
"w"
:
750
,
"h"
:
1748
}
}
}
as
const
}
as
const
src/pages/accept-pk/index.tsx
View file @
94fd1b39
...
@@ -25,7 +25,7 @@ const AcceptPk = () => {
...
@@ -25,7 +25,7 @@ const AcceptPk = () => {
)
)
useDidShow
(
async
()
=>
{
useDidShow
(
async
()
=>
{
if
(
router
.
params
.
initiator
&&
router
.
params
.
stageId
)
{
if
(
router
?.
params
?.
initiator
&&
router
?.
params
?
.
stageId
)
{
await
fetchUserDetails
(
router
.
params
)
await
fetchUserDetails
(
router
.
params
)
}
}
})
})
...
@@ -35,7 +35,7 @@ const AcceptPk = () => {
...
@@ -35,7 +35,7 @@ const AcceptPk = () => {
const
toGame
=
()
=>
{
const
toGame
=
()
=>
{
if
(
isClickRef
.
current
)
return
if
(
isClickRef
.
current
)
return
isClickRef
.
current
=
true
isClickRef
.
current
=
true
const
stageId
=
+
(
router
.
params
.
stageId
??
-
1
)
const
stageId
=
+
(
router
?.
params
?
.
stageId
??
-
1
)
Promise
.
all
([
Promise
.
all
([
getQuestionList
({
stageId
,
isBattle
:
true
}),
getQuestionList
({
stageId
,
isBattle
:
true
}),
getStageDetail
(
stageId
)
getStageDetail
(
stageId
)
...
...
src/pages/game/battle/index.tsx
View file @
94fd1b39
...
@@ -8,8 +8,8 @@ const BattleIndex = () => {
...
@@ -8,8 +8,8 @@ const BattleIndex = () => {
const
router
=
useRouter
<
{
battleId
:
string
}
>
()
const
router
=
useRouter
<
{
battleId
:
string
}
>
()
const
[
dataSource
,
loadData
]
=
useFetch
(
getPkShareResult
,
useCallback
(()
=>
{
const
[
dataSource
,
loadData
]
=
useFetch
(
getPkShareResult
,
useCallback
(()
=>
{
return
router
.
params
return
router
?
.
params
},
[
router
.
params
]))
},
[
router
?
.
params
]))
useDidShow
(()
=>
{
useDidShow
(()
=>
{
loadData
()
loadData
()
...
...
src/pages/game/play/index.tsx
View file @
94fd1b39
...
@@ -48,7 +48,7 @@ const GamePlay = () => {
...
@@ -48,7 +48,7 @@ const GamePlay = () => {
const
router
=
useRouter
()
const
router
=
useRouter
()
const
isBattle
=
useMemo
(()
=>
{
const
isBattle
=
useMemo
(()
=>
{
return
router
.
params
.
isBattle
===
'true'
return
router
?.
params
?
.
isBattle
===
'true'
},
[
router
])
},
[
router
])
const
shareParams
=
useCallback
(()
=>
{
const
shareParams
=
useCallback
(()
=>
{
...
...
src/pages/main/components/share-modal.tsx
View file @
94fd1b39
...
@@ -31,7 +31,7 @@ export default function ShareModal () {
...
@@ -31,7 +31,7 @@ export default function ShareModal () {
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
const
router
=
useRouter
<
{
groupId
:
string
,
shareUserId
:
string
}
>
()
const
router
=
useRouter
<
{
groupId
:
string
,
shareUserId
:
string
}
>
()
const
{
groupId
,
shareUserId
}
=
router
.
params
const
{
groupId
,
shareUserId
}
=
router
?.
params
??
{
groupId
:
''
,
shareUserId
:
''
}
// 邀请弹框
// 邀请弹框
const
joinTribeWithCode
=
useCallback
(
async
()
=>
{
const
joinTribeWithCode
=
useCallback
(
async
()
=>
{
...
...
src/pages/main/main.tsx
View file @
94fd1b39
...
@@ -19,8 +19,8 @@ const MainPage = () => {
...
@@ -19,8 +19,8 @@ const MainPage = () => {
const
currentPkStage
=
useStoreState
(
states
=>
states
.
mainModel
.
currentPkStage
)
const
currentPkStage
=
useStoreState
(
states
=>
states
.
mainModel
.
currentPkStage
)
useEffect
(()
=>
{
useEffect
(()
=>
{
handleShare
(
router
.
params
)
handleShare
(
router
?
.
params
)
},
[
router
.
params
])
},
[
router
?
.
params
])
const
getShareParams
=
useCallback
(()
=>
{
const
getShareParams
=
useCallback
(()
=>
{
const
userInfo
=
getStorage
(
StorageKeys
.
userInfo
)
const
userInfo
=
getStorage
(
StorageKeys
.
userInfo
)
...
...
src/pages/prepare/guide/pk/scene.tsx
View file @
94fd1b39
...
@@ -10,7 +10,7 @@ const Scene = () => {
...
@@ -10,7 +10,7 @@ const Scene = () => {
const
stageList
=
useStoreState
(
state
=>
state
.
mainModel
.
stageList
)
const
stageList
=
useStoreState
(
state
=>
state
.
mainModel
.
stageList
)
const
router
=
useRouter
<
{
id
:
string
}
>
()
const
router
=
useRouter
<
{
id
:
string
}
>
()
/** 第二关 */
/** 第二关 */
const
isSecondStage
=
useMemo
(()
=>
stageList
.
findIndex
(
stage
=>
stage
.
id
===
+
router
.
params
.
id
)
===
1
,
[
stageList
,
router
])
const
isSecondStage
=
useMemo
(()
=>
stageList
.
findIndex
(
stage
=>
stage
.
id
===
+
router
?.
params
?
.
id
)
===
1
,
[
stageList
,
router
])
const
stageDetail
=
useStoreState
(
state
=>
state
.
gameModel
.
stageDetail
)
const
stageDetail
=
useStoreState
(
state
=>
state
.
gameModel
.
stageDetail
)
const
stageDetailPre
=
useStoreState
(
state
=>
state
.
gameModel
.
stageDetailPre
)
const
stageDetailPre
=
useStoreState
(
state
=>
state
.
gameModel
.
stageDetailPre
)
const
updatePkGuideActive
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
updatePkGuideActive
)
const
updatePkGuideActive
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
updatePkGuideActive
)
...
...
src/pages/prepare/index.tsx
View file @
94fd1b39
...
@@ -51,7 +51,7 @@ const Prepare = () => {
...
@@ -51,7 +51,7 @@ const Prepare = () => {
const
getSetting
=
useStoreActions
(
actions
=>
actions
.
userModel
.
getSetting
)
const
getSetting
=
useStoreActions
(
actions
=>
actions
.
userModel
.
getSetting
)
/** 第一关 */
/** 第一关 */
const
isFirstStage
=
useMemo
(()
=>
stageList
.
findIndex
(
stage
=>
stage
.
id
===
+
router
.
params
.
id
)
===
0
,
[
stageList
,
router
])
const
isFirstStage
=
useMemo
(()
=>
stageList
.
findIndex
(
stage
=>
stage
.
id
===
+
router
?.
params
?
.
id
)
===
0
,
[
stageList
,
router
])
const
tabs
:
TabItem
[]
=
[
const
tabs
:
TabItem
[]
=
[
{
{
...
@@ -81,7 +81,7 @@ const Prepare = () => {
...
@@ -81,7 +81,7 @@ const Prepare = () => {
getSetting()
getSetting()
fetchAccount()
fetchAccount()
toggleLoad()
toggleLoad()
await getStageDetail(+
router.params.id || 1
)
await getStageDetail(+
(router?.params?.id || 1)
)
toggleLoad()
toggleLoad()
})
})
...
...
src/utils/share.ts
View file @
94fd1b39
...
@@ -32,7 +32,7 @@ export function parseQuery (queryString: string): Partial<Record<string, string>
...
@@ -32,7 +32,7 @@ export function parseQuery (queryString: string): Partial<Record<string, string>
}
}
export
async
function
handleShare
<
T
extends
Partial
<
Record
<
string
,
string
>>>
(
arg
:
RouteParamsWithShare
<
T
>
):
Promise
<
T
>
{
export
async
function
handleShare
<
T
extends
Partial
<
Record
<
string
,
string
>>>
(
arg
:
RouteParamsWithShare
<
T
>
):
Promise
<
T
>
{
const
{
scene
,
...
restParams
}
=
arg
const
{
scene
,
...
restParams
}
=
arg
||
{}
if
(
scene
)
{
if
(
scene
)
{
const
{
shareId
}
=
parseQuery
(
scene
)
const
{
shareId
}
=
parseQuery
(
scene
)
...
...
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