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
0a16dc51
Commit
0a16dc51
authored
Jun 19, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 引导优化
parent
51164f53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
main-component.tsx
src/pages/main/main-underground/main-component.tsx
+7
-2
guide.ts
src/store/modules/guide.ts
+2
-2
No files found.
src/pages/main/main-underground/main-component.tsx
View file @
0a16dc51
...
...
@@ -33,6 +33,7 @@ const MainPage = () => {
const
isReady
=
useStoreState
(
state
=>
state
.
mainModel
.
isReady
)
const
isGroupGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isGroupGuideComplete
)
const
isMainGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isMainGuideComplete
)
const
isPkGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isPkGuideComplete
)
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
updateGroupGuideActive
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
updateGroupGuideActive
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
...
...
@@ -66,8 +67,12 @@ const MainPage = () => {
}
const
currentIndex
=
stageList
.
findIndex
(
c
=>
c
.
status
===
StageStatus
.
CURRENT
)
const
point
=
await
fetchAccount
()
if
(
!
isPkGuideComplete
&&
currentIndex
<=
2
)
{
return
}
const
point
=
await
fetchAccount
()
if
(
point
<
50
||
currentIndex
>=
3
)
{
const
res
=
await
fetchTribeInfo
()
if
(
!
res
?.
id
)
{
...
...
@@ -76,7 +81,7 @@ const MainPage = () => {
}
}
fn
()
},
[
fetchAccount
,
isGroupGuideComplete
,
stageList
,
updateGroupGuideActive
,
userInfo
,
fetchTribeInfo
,
isMainGuideComplete
,
isFocus
])
},
[
fetchAccount
,
is
PkGuideComplete
,
is
GroupGuideComplete
,
stageList
,
updateGroupGuideActive
,
userInfo
,
fetchTribeInfo
,
isMainGuideComplete
,
isFocus
])
onAppHide
(()
=>
{
player
.
pause
()
...
...
src/store/modules/guide.ts
View file @
0a16dc51
...
...
@@ -128,12 +128,12 @@ const guideModel: GuideModel = {
}),
completeStoreGuide
:
thunk
(
async
(
actions
)
=>
{
actions
.
updateState
({
isStoreGuideComplete
:
true
,
storeGuideStep
:
-
1
})
actions
.
updateState
({
isStoreGuideComplete
:
true
,
storeGuideStep
:
-
1
,
storeGuideActive
:
false
})
updateStorage
(
StorageKeys
.
isStoreGuideComplete
,
true
)
}),
completeGroupGuide
:
thunk
(
async
(
actions
)
=>
{
actions
.
updateState
({
isGroupGuideComplete
:
true
,
groupGuideStep
:
-
1
})
actions
.
updateState
({
isGroupGuideComplete
:
true
,
groupGuideStep
:
-
1
,
groupGuideActive
:
false
})
updateStorage
(
StorageKeys
.
isGroupGuideComplete
,
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