Commit 4d2874c2 authored by m's avatar m

feat: update

parent e16ddc04
......@@ -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()])
})
// 加入部落
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment