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
4d2874c2
Commit
4d2874c2
authored
Apr 05, 2023
by
m
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
e16ddc04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
main.tsx
src/pages/main/main.tsx
+4
-3
No files found.
src/pages/main/main.tsx
View file @
4d2874c2
...
...
@@ -6,7 +6,7 @@ import {
}
from
'@tarojs/taro'
import
{
useState
,
useMemo
,
useCallback
}
from
'react'
import
{
useStoreActions
,
useStoreState
}
from
'@/store/hooks'
import
{
getTribeInfo
,
joinTribe
}
from
'@/api/group'
import
{
joinTribe
}
from
'@/api/group'
import
{
useRequest
}
from
'@/hooks'
import
type
{
TabbarRef
}
from
'../../custom-tab-bar/index'
...
...
@@ -26,6 +26,7 @@ const MainPage = () => {
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
updateUserInfo
=
useStoreActions
(
actions
=>
actions
.
userModel
.
updateUserInfo
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
const
queryTribePoint
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
queryTribePoint
)
const
[
nav
]
=
useState
(
getMenuButtonBoundingClientRect
())
const
router
=
useRouter
<
{
groupId
:
string
,
inviteId
:
string
}
>
()
const
{
groupId
,
inviteId
}
=
router
.
params
...
...
@@ -58,11 +59,11 @@ const MainPage = () => {
})
})
fetchTribeInfo
().
then
((
res
)
=>
{
Promise
.
all
([
fetchTribeInfo
().
then
((
res
)
=>
{
if
(
!
res
||
!
res
.
id
)
{
joinTribeByCode
()
}
})
})
,
queryTribePoint
()])
})
// 加入部落
...
...
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