feat: 优化个人中心邀请卡片
This commit is contained in:
@@ -88,6 +88,7 @@ onShow(async () => {
|
||||
if (loggedIn.value) {
|
||||
await Promise.all([
|
||||
invite.refresh().catch(() => {}),
|
||||
invite.refreshActivity().catch(() => {}),
|
||||
userStore.fetchProfile(),
|
||||
userStore.fetchStats(),
|
||||
userStore.fetchMemberships(),
|
||||
@@ -103,6 +104,7 @@ async function handleLogin() {
|
||||
const { isNewUser } = await userStore.loginWithSetup()
|
||||
if (!isNewUser) {
|
||||
await Promise.all([
|
||||
invite.refreshActivity().catch(() => {}),
|
||||
userStore.fetchStats(),
|
||||
bookingStore.fetchUpcomingBookings(),
|
||||
])
|
||||
|
||||
@@ -9,6 +9,11 @@ import { getSystemLayout } from '../../utils/system'
|
||||
const invite = useInviteStore()
|
||||
const user = useUserStore()
|
||||
const navBarHeight = `${getSystemLayout().navBarHeight}px`
|
||||
onShow(() => { if (user.loggedIn) invite.refresh().catch(() => {}) })
|
||||
onShow(() => {
|
||||
if (user.loggedIn) {
|
||||
invite.refresh().catch(() => {})
|
||||
invite.refreshActivity().catch(() => {})
|
||||
}
|
||||
})
|
||||
onShareAppMessage(() => ({ title: '送你 95 折购卡礼,一起练普拉提', path: invite.code ? `/pages/card/detail?showAll=1&inviteCode=${invite.code}` : '/pages/home/index' }))
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user