feat(upgrade): 优化版本更新检测流程并添加问题版本修复机制

This commit is contained in:
2025-12-29 18:07:29 +08:00
parent b2bff1ed54
commit ec869f0395
6 changed files with 94 additions and 47 deletions

View File

@@ -14,6 +14,7 @@ const BASE_URL_MAP = {
},
production: {
MAIN: 'https://global.nuttyreading.com/',
// MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
// PAYMENT: 'https://pay.example.com', // 暂时用不到
// CDN: 'https://cdn.example.com', // 暂时用不到
},

View File

@@ -2,9 +2,21 @@ import { mainClient, skeletonClient } from '@/api/clients'
import type { IApiResponse } from '@/api/types'
/**
* 请求更新包
* 请求备用更新包
*/
export async function requestUpdatePackage(type: string, version: string) {
const res = await skeletonClient.request<IApiResponse>({
url: 'common/apkConfig/getBackupUpdateUrl',
method: 'POST',
data: { type, version }
})
return res
}
/**
* 检测问题版本号及修复更新包
*/
export async function checkProblemVersion(type: string, version: string) {
const res = await skeletonClient.request<IApiResponse>({
url: 'common/apkConfig/getUpdateUrl',
method: 'POST',