mirror of
https://github.com/gkd-kit/docs.git
synced 2024-11-16 16:42:19 +08:00
fix: downloadUrl
This commit is contained in:
parent
802974ded2
commit
a58b7267fc
|
@ -25,8 +25,9 @@ const downloadApk = async () => {
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
apkUrl.value = localStorage.getItem('apkUrl') || '';
|
apkUrl.value = localStorage.getItem('apkUrl') || '';
|
||||||
const versionUrl = 'https://registry.npmmirror.com/@gkd-kit/app/latest/files';
|
const versionUrl = 'https://registry.npmmirror.com/@gkd-kit/app/latest/files';
|
||||||
const r = await fetch(versionUrl).then((r) => r.json());
|
const r = await fetch(versionUrl);
|
||||||
apkUrl.value = new URL(r.downloadUrl, r.url).href;
|
const data = await r.json();
|
||||||
|
apkUrl.value = new URL(data.downloadUrl, r.url).href;
|
||||||
localStorage.setItem('apkUrl', apkUrl.value);
|
localStorage.setItem('apkUrl', apkUrl.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user