fix bugs
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { getReferralShareText, getReferralShareTitle } from '@/utils/config'
|
||||
import { getReferralShareText, getReferralShareTitle, shareReferralText } from '@/utils/referralShare'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -45,7 +45,7 @@ const shareCode = () => {
|
||||
referralId: userStore.userInfo?.referral_id,
|
||||
})
|
||||
|
||||
navigator.share({ title: getReferralShareTitle(), text })
|
||||
void shareReferralText(text, getReferralShareTitle())
|
||||
}
|
||||
|
||||
const copyCode = () => {
|
||||
|
||||
@@ -40,7 +40,7 @@ import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { getReferralShareText, getReferralShareTitle } from '@/utils/config'
|
||||
import { getReferralShareText, getReferralShareTitle, shareReferralText } from '@/utils/referralShare'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -69,7 +69,7 @@ const shareCode = () => {
|
||||
referralId: props.referralId,
|
||||
})
|
||||
|
||||
navigator.share({ title: getReferralShareTitle(), text })
|
||||
void shareReferralText(text, getReferralShareTitle())
|
||||
}
|
||||
|
||||
const copyCode = () => {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useConfigStore } from '@/store/configStore'
|
||||
import { getTradeBuyPrice, lastPrice, stopLastPricePolling } from '@/utils/price'
|
||||
import { getStoreClosedMessage, isStoreClosed } from '@/utils/storeHours'
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { getReferralShareText, getReferralShareTitle } from '@/utils/config'
|
||||
import { getReferralShareText, getReferralShareTitle, shareReferralText } from '@/utils/referralShare'
|
||||
import { useBanners } from './useBanners'
|
||||
import { usePriceChart, type ChartMetalType } from './usePriceChart'
|
||||
import type { HomeActionItem } from '../layouts/types'
|
||||
@@ -122,14 +122,7 @@ export function useHomePage() {
|
||||
referralId: userStore.userInfo?.referral_id,
|
||||
})
|
||||
|
||||
try {
|
||||
await navigator.share({
|
||||
title: getReferralShareTitle(configStore.config.name),
|
||||
text,
|
||||
})
|
||||
} catch {
|
||||
copyCode()
|
||||
}
|
||||
await shareReferralText(text, getReferralShareTitle(configStore.config.name))
|
||||
}
|
||||
|
||||
function copyCode() {
|
||||
|
||||
Reference in New Issue
Block a user