From 92ef6116f53fcf40e64bc7e90ca4589e34dd83c5 Mon Sep 17 00:00:00 2001 From: luoluo <1425735414@qq.com> Date: Thu, 4 Jul 2024 17:47:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:getCheckTextUrl=E5=A2=9E=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=8F=AF=E7=94=A8=E5=9F=9F=E7=9A=84=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=8F=AF=E7=94=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main/handlers/utils/network.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/main/handlers/utils/network.js b/app/main/handlers/utils/network.js index 46a8992dbf..35c138c64d 100644 --- a/app/main/handlers/utils/network.js +++ b/app/main/handlers/utils/network.js @@ -84,24 +84,25 @@ async function getAvailableOSSDomain() { } /**获取校验url */ -const getCheckTextUrl=async()=>{ - let url='' +const getCheckTextUrl = async () => { + const domain = await getAvailableOSSDomain(); + let url = '' switch (process.platform) { case "darwin": if (process.arch === "arm64") { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_darwin_arm64.sha256.txt` + url = `https://${domain}/yak/${version}/yak_darwin_arm64.sha256.txt` } else { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_darwin_amd64.sha256.txt` + url = `https://${domain}/yak/${version}/yak_darwin_amd64.sha256.txt` } break case "win32": - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_windows_amd64.exe.sha256.txt` + url = `https://${domain}/yak/${version}/yak_windows_amd64.exe.sha256.txt` break case "linux": if (process.arch === "arm64") { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_linux_arm64.sha256.txt` + url = `https://${domain}.com/yak/${version}/yak_linux_arm64.sha256.txt` } else { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_linux_amd64.sha256.txt` + url = `https://${domain}.com/yak/${version}/yak_linux_amd64.sha256.txt` } break default: