From e259ceb6c4ac88578e6662ac46cc271cbdd15553 Mon Sep 17 00:00:00 2001 From: SunWuyuan <1847261658@qq.com> Date: Sun, 1 Sep 2024 12:28:49 +0800 Subject: [PATCH] 1 --- src/pages/tools/asdm.vue | 66 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/src/pages/tools/asdm.vue b/src/pages/tools/asdm.vue index e329c9c..77b119b 100644 --- a/src/pages/tools/asdm.vue +++ b/src/pages/tools/asdm.vue @@ -85,6 +85,40 @@ MacOS 下载 + + + + + + 下载 Scratch Link + 公益ScratchLink镜像 + + + + + 未正确加载下载地址?您可以尝试在应用商店中下载 Mac + OS 版本 和 Windows + 10 + 以上版本 的 + Scratch 桌面版。 + + + 该版本镜像于 {{ release.date }},ScratchLink版本为 {{ release.scratch_link_version }}。 + + + + + + + Windows 下载 + + + + MacOS 下载 + @@ -123,10 +157,13 @@ export default { stat: 0, // 0 => 加载中,1 => 加载成功,其他 => 加载失败:错误信息 url: { windows: '', - macos: '' + macos: '', + windows_link: '', + macos_link: '', }, date: '一周以内', - scratch_version: '未知' + scratch_version: '未知', + scratch_link_version: '未知', }, download_source: { state: 'ghproxy', abbr: 'mirror.ghproxy.com/https://github.com' }, @@ -147,7 +184,7 @@ export default { created() { this.loading = true this.release.stat = 0 - request.get(this.scratch_proxy+'/asdm') + request.get(this.scratch_proxy + '/asdm') .then(res => { this.release.stat = 1 this.release.url.windows = res.assets. @@ -158,8 +195,17 @@ export default { filter((element) => { return (element['name'] == "scratch-mac.dmg") })[0] .browser_download_url .replace('https://github.com', '') + this.release.url.windows_link = res.assets. + filter((element) => { return (element['name'] == "scratch-link-win.zip") })[0] + .browser_download_url + .replace('https://github.com', '') + this.release.url.macos_link = res.assets. + filter((element) => { return (element['name'] == "scratch-link-mac.zip") })[0] + .browser_download_url + .replace('https://github.com', '') this.release.date = new Date(res.published_at).toLocaleString() - this.release.scratch_version = JSON.parse(res.body).scratch_version + this.release.scratch_version = JSON.parse(res.body).scratch_version.split('-')[0] + this.release.scratch_link_version = JSON.parse(res.body).scratch_version.split('-')[1] this.loading = false }) .catch(err => { @@ -175,8 +221,18 @@ export default { filter((element) => { return (element['name'] == "scratch-mac.dmg") })[0] .browser_download_url .replace('https://github.com', '') + this.release.url.windows_link = res.assets. + filter((element) => { return (element['name'] == "scratch-link-win.zip") })[0] + .browser_download_url + .replace('https://github.com', '') + this.release.url.macos_link = res.assets. + filter((element) => { return (element['name'] == "scratch-link-mac.zip") })[0] + .browser_download_url + .replace('https://github.com', '') this.release.date = new Date(res.published_at).toLocaleString() - this.release.scratch_version = JSON.parse(res.body).scratch_version + this.release.scratch_version = JSON.parse(res.body).scratch_version.split('-')[0] + this.release.scratch_link_version = JSON.parse(res.body).scratch_version.split('-')[1] + this.loading = false }) .catch(err => {
+ 该版本镜像于 {{ release.date }},ScratchLink版本为 {{ release.scratch_link_version }}。 +