From 9d1bb7cef251c1dbc55f7e31237e5b680fd0fae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E4=BA=86=E4=B8=AAJ?= Date: Fri, 15 May 2026 21:49:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/global.ts | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/api/global.ts b/src/api/global.ts index ebfe748..213a9b2 100644 --- a/src/api/global.ts +++ b/src/api/global.ts @@ -254,30 +254,21 @@ const globalApi = { // 检查APK版本 getVersions: async (params: anyObj) => { - const url = location.href - if ( - url.includes('localhost') || - url.includes('192.168.') || - url.includes('127.0.0.1') || - url.includes('lingxixue.com') - ) { - params = { - magic: str.getMagic(), - ...(params || {}), - } + params = { + ...(params || {}), + magic: str.getMagic(), } return get('/apkManagement/list', params) }, // 检查版本 - checkVersion: (params: anyObj) => - http.request({ - url: '/apkManagement/queryLatest', - headers: { - Authorization: '', - }, - params, - }), + checkVersion: (params: anyObj) => { + params = { + ...(params || {}), + magic: str.getMagic(), + } + return get('/apkManagement/queryLatest', params) + }, // 更新APPs updateApps: (data: anyObj) =>