From 87a0ceb5b0018b367811f6b0efa3b08daefc0470 Mon Sep 17 00:00:00 2001 From: alger Date: Fri, 28 Feb 2025 19:50:53 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E4=BC=98=E5=8C=96WEB?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F=E4=BB=A3?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/common/InstallAppModal.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/common/InstallAppModal.vue b/src/renderer/components/common/InstallAppModal.vue index 9fb6e7a..a9ad8eb 100644 --- a/src/renderer/components/common/InstallAppModal.vue +++ b/src/renderer/components/common/InstallAppModal.vue @@ -46,7 +46,7 @@ import { onMounted, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { isElectron, isMobile } from '@/utils'; -import { getLatestReleaseInfo } from '@/utils/update'; +import { getLatestReleaseInfo, getProxyNodes } from '@/utils/update'; import config from '../../../../package.json'; @@ -63,6 +63,8 @@ const closeModal = () => { } }; +const proxyHosts = ref([]); + onMounted(async () => { // 如果是 electron 环境,不显示安装提示 if (isElectron || isMobile.value) { @@ -78,6 +80,7 @@ onMounted(async () => { // 获取最新版本信息 releaseInfo.value = await getLatestReleaseInfo(); showModal.value = true; + proxyHosts.value = await getProxyNodes(); }); const handleInstall = async (): Promise => { @@ -118,7 +121,8 @@ const handleInstall = async (): Promise => { } if (downloadUrl) { - window.open(`https://ghproxy.cn/${downloadUrl}`, '_blank'); + const proxyDownloadUrl = `${proxyHosts.value[0]}/${downloadUrl}`; + window.open(proxyDownloadUrl, '_blank'); } else { // 如果没有找到对应的安装包,跳转到 release 页面 window.open('https://github.com/algerkong/AlgerMusicPlayer/releases/latest', '_blank');