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