🆕 过滤客户端版本号

This commit is contained in:
chaos-zhu 2024-08-16 14:00:31 +08:00
parent 2d6f5d091f
commit ee63a53d6e

View File

@ -61,13 +61,12 @@ let isNew = computed(() => {
async function checkLatestVersion() { async function checkLatestVersion() {
const timeout = 3000 const timeout = 3000
const proxy = 'https://ghproxy.com/'
try { try {
const timeoutPromise = new Promise((_, reject) => const timeoutPromise = new Promise((_, reject) =>
setTimeout(() => reject(new Error('请求超时')), timeout) setTimeout(() => reject(new Error('请求超时')), timeout)
) )
const url = 'https://api.github.com/repos/chaos-zhu/easynode/releases' const url = `https://api.github.com/repos/chaos-zhu/easynode/releases?ts=${ new Date().getTime() }`
const fetchPromise = fetch(url, { const fetchPromise = fetch(url, {
headers: { headers: {
'Accept': 'application/vnd.github.v3+json' 'Accept': 'application/vnd.github.v3+json'