feat(upgrade): 优化版本更新检测流程并添加问题版本修复机制
This commit is contained in:
@@ -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', // 暂时用不到
|
||||
},
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user