This commit is contained in:
parent
5f67cf76bd
commit
1414444175
@ -155,7 +155,15 @@ import m3_3 from './mobile3/row-3-column-1.webp'
|
||||
import pc3_1 from './pc3/row-1-column-1.webp'
|
||||
import pc3_2 from './pc3/row-2-column-1.webp'
|
||||
import pc3_3 from './pc3/row-3-column-1.webp'
|
||||
import { downLoadIos } from '@/utils/constant.ts'
|
||||
import { getAllQueryString } from '@/utils/url-utils.ts'
|
||||
|
||||
const ic = getAllQueryString('ic') || sessionStorage.getItem('ic')
|
||||
const ADJ_GO_LINK =
|
||||
ic && typeof ic === 'string'
|
||||
? `https://hifastvpn.go.link?adj_t=1xf6e7ru&inviteCode=${ic}`
|
||||
: 'https://hifastvpn.go.link/?adj_t=1xf6e7ru'
|
||||
|
||||
const downLoadIos = ADJ_GO_LINK
|
||||
|
||||
interface Hotzone {
|
||||
x: number
|
||||
|
||||
@ -130,14 +130,29 @@ import { getAllQueryString } from '@/utils/url-utils.ts'
|
||||
import DownloadMethodList from './DownloadMethodList/DownloadMethodList.vue'
|
||||
import FAQAccordion from './FAQAccordion/index.vue'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { downLoadIos } from '@/utils/constant.ts'
|
||||
|
||||
const ic = getAllQueryString('ic') || sessionStorage.getItem('ic')
|
||||
const ADJ_GO_LINK =
|
||||
ic && typeof ic === 'string'
|
||||
? `https://hifastvpn.go.link?adj_t=1xf6e7ru&inviteCode=${ic}`
|
||||
: 'https://hifastvpn.go.link/?adj_t=1xf6e7ru'
|
||||
|
||||
const getTrackedUrl = (url: string) => {
|
||||
if (!url) return ''
|
||||
return `${ADJ_GO_LINK}&adj_redirect=${encodeURIComponent(url)}`
|
||||
}
|
||||
|
||||
const downLoadWin = ref(
|
||||
getTrackedUrl(
|
||||
'https://api.hifast.biz/v1/common/client/download/file/Hi快VPN-windows-1.0.0.exe',
|
||||
),
|
||||
)
|
||||
const downLoadMac = ref('https://apps.apple.com/us/app/hi%E5%BF%ABvpn/id6755683167')
|
||||
const downLoadMac = ref(ADJ_GO_LINK)
|
||||
const downLoadIos = ref(ADJ_GO_LINK)
|
||||
const downLoadAndroid = ref(
|
||||
'https://api.hifast.biz/v1/common/client/download/file/Hi快VPN-android-1.0.0.apk',
|
||||
ic && typeof ic === 'string'
|
||||
? `https://hifastvpn.go.link?adj_t=1xf6e7ru&inviteCode=${ic}`
|
||||
: 'https://api.hifast.biz/v1/common/client/download/file/Hi%E5%BF%ABVPN-android-1.0.0.apk',
|
||||
)
|
||||
// request
|
||||
// .get('/api/v1/common/client/download', {
|
||||
@ -176,7 +191,7 @@ const otherClients = computed(() => {
|
||||
]
|
||||
})
|
||||
|
||||
function changeActiveIndex(index) {
|
||||
function changeActiveIndex(index: number) {
|
||||
activeIndex.value = index
|
||||
window.scrollTo(0, 0)
|
||||
}
|
||||
|
||||
@ -120,10 +120,15 @@ onMounted(() => {
|
||||
// downLoadMac.value = res.url
|
||||
// })
|
||||
|
||||
const ADJ_BASE_URL = 'https://hifastvpn.go.link/?adj_t=1xf6e7ru'
|
||||
const ic = getAllQueryString('ic') || sessionStorage.getItem('ic')
|
||||
const ADJ_GO_LINK =
|
||||
ic && typeof ic === 'string'
|
||||
? `https://hifastvpn.go.link?adj_t=1xf6e7ru&inviteCode=${ic}`
|
||||
: 'https://hifastvpn.go.link/?adj_t=1xf6e7ru'
|
||||
|
||||
const getTrackedUrl = (target: string) => {
|
||||
if (!target) return ''
|
||||
return `${ADJ_BASE_URL}&adj_redirect=${encodeURIComponent(target)}`
|
||||
return `${ADJ_GO_LINK}&adj_redirect=${encodeURIComponent(target)}`
|
||||
}
|
||||
|
||||
const allDownloadOptions = computed(() => [
|
||||
@ -141,7 +146,7 @@ const allDownloadOptions = computed(() => [
|
||||
key: 'mac',
|
||||
mainIcon: Icon3,
|
||||
secondaryIcon: MacIcon,
|
||||
link: getTrackedUrl('https://apps.apple.com/us/app/hi%E5%BF%ABvpn/id6755683167'),
|
||||
link: ADJ_GO_LINK,
|
||||
label: 'macOS',
|
||||
id: 'downloadButton_mac',
|
||||
},
|
||||
@ -149,7 +154,7 @@ const allDownloadOptions = computed(() => [
|
||||
key: 'ios',
|
||||
mainIcon: Icon2,
|
||||
secondaryIcon: AppleIcon,
|
||||
link: '/help',
|
||||
link: ADJ_GO_LINK,
|
||||
label: 'iOS',
|
||||
id: 'downloadButton_apple',
|
||||
},
|
||||
@ -157,19 +162,31 @@ const allDownloadOptions = computed(() => [
|
||||
key: 'android',
|
||||
mainIcon: Icon4,
|
||||
secondaryIcon: AndroidIcon,
|
||||
link: getTrackedUrl(
|
||||
'https://api.hifast.biz/v1/common/client/download/file/Hi%E5%BF%ABVPN-android-1.0.0.apk',
|
||||
),
|
||||
link:
|
||||
ic && typeof ic === 'string'
|
||||
? `https://hifastvpn.go.link?adj_t=1xf6e7ru&inviteCode=${ic}`
|
||||
: 'https://api.hifast.biz/v1/common/client/download/file/Hi%E5%BF%ABVPN-android-1.0.0.apk',
|
||||
label: 'Android',
|
||||
id: 'downloadButton_android',
|
||||
},
|
||||
])
|
||||
|
||||
const mainButton = computed(() => {
|
||||
return (
|
||||
allDownloadOptions.value.find((opt) => opt.key === currentPlatform.value) ||
|
||||
allDownloadOptions.value[0]
|
||||
)
|
||||
const platform = currentPlatform.value
|
||||
const opt =
|
||||
allDownloadOptions.value.find((opt) => opt.key === platform) || allDownloadOptions.value[0]
|
||||
|
||||
if (['mac', 'android', 'ios'].includes(platform)) {
|
||||
// Android 无邀请码时使用直传链接(即 opt.link)
|
||||
if (platform === 'android' && !(ic && typeof ic === 'string')) {
|
||||
return opt
|
||||
}
|
||||
return {
|
||||
...opt,
|
||||
link: ADJ_GO_LINK,
|
||||
}
|
||||
}
|
||||
return opt
|
||||
})
|
||||
|
||||
const otherButtons = computed(() => {
|
||||
|
||||
@ -164,6 +164,7 @@ import MobileLogo from './mobile-logo.svg?component'
|
||||
import ScreenshotMobile from './screenshot-mobile.png'
|
||||
import ScreenshotDesktop from './screenshot-desktop.webp'
|
||||
import request from '@/utils/request'
|
||||
import { getAllQueryString } from '@/utils/url-utils.ts'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@ -195,6 +196,10 @@ const fetchUserInfo = async () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const ic = getAllQueryString('ic')
|
||||
if (ic && typeof ic === 'string') {
|
||||
sessionStorage.setItem('ic', ic)
|
||||
}
|
||||
fetchUserInfo()
|
||||
if (route.query.login === 'true') {
|
||||
openLoginModal()
|
||||
|
||||
@ -77,12 +77,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useInfiniteScroll } from '@vueuse/core'
|
||||
import { getAllQueryString } from '@/utils/url-utils.ts'
|
||||
import MobileLogo from '@/pages/Home/mobile-logo.svg?component'
|
||||
import RightText from './right-text.svg?component'
|
||||
const router = useRouter()
|
||||
|
||||
onMounted(() => {
|
||||
const ic = getAllQueryString('ic')
|
||||
if (ic && typeof ic === 'string') {
|
||||
sessionStorage.setItem('ic', ic)
|
||||
}
|
||||
})
|
||||
|
||||
const isLoading = ref(false)
|
||||
const hasMore = ref(true)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user