20 lines
934 B
Vue
20 lines
934 B
Vue
<template><view :style="{ paddingTop: navBarHeight }"><CustomNavBar title="邀请好友" show-back /><InviteCard /></view></template>
|
|
<script setup lang="ts">
|
|
import { onShareAppMessage, onShow } from '@dcloudio/uni-app'
|
|
import CustomNavBar from '../../components/CustomNavBar.vue'
|
|
import InviteCard from '../../components/InviteCard.vue'
|
|
import { useInviteStore } from '../../stores/invite'
|
|
import { useUserStore } from '../../stores/user'
|
|
import { getSystemLayout } from '../../utils/system'
|
|
const invite = useInviteStore()
|
|
const user = useUserStore()
|
|
const navBarHeight = `${getSystemLayout().navBarHeight}px`
|
|
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>
|