feat: 添加应用版本更新功能;实现版本检查、更新提示及国际化支持

This commit is contained in:
2025-12-30 18:07:14 +07:00
parent 7ce60b860c
commit e7e2b1bd85
6 changed files with 484 additions and 70 deletions

View File

@@ -65,3 +65,25 @@ export type UserDepositOrderBody = TreatyQuery<typeof client.api.deposit.orders.
export type UserWithdrawOrderData = Treaty.Data<typeof client.api.withdraw.get>["data"][number];
export type UserWithdrawOrderBody = TreatyQuery<typeof client.api.withdraw.get>;
/**
* 应用版本信息
*/
export interface VersionInfo {
/** 最新版本号,如 "1.2.3" */
version: string;
/** 构建号 */
buildNumber?: number;
/** 是否强制更新 */
forceUpdate: boolean;
/** 更新提示信息 */
updateMessage?: string;
/** 更新下载链接App Store / Google Play */
updateUrl?: string;
/** 最低支持版本,低于此版本必须更新 */
minSupportVersion?: string;
/** 发布时间 */
releaseDate?: string;
/** 更新内容 */
releaseNotes?: string[];
}