diff --git a/functions/api/version.ts b/functions/api/version.ts index da4a3ff..c3fe9c3 100644 --- a/functions/api/version.ts +++ b/functions/api/version.ts @@ -18,7 +18,7 @@ interface Env { interface VersionConfig { ios: VersionInfo; android: VersionInfo; - web: VersionInfo; + browser: VersionInfo; } // 版本配置 - 直接在这里管理版本信息 @@ -37,7 +37,7 @@ const versionConfig: VersionConfig = { updateUrl: "https://play.google.com/store/apps/details?id=riwa.ionic.app", minSupportVersion: "0.9.0", }, - web: { + browser: { version: "0.0.1", forceUpdate: false, updateMessage: "修复了一些问题并优化了性能", @@ -49,11 +49,11 @@ const versionConfig: VersionConfig = { export const onRequestGet: PagesFunction = async (context) => { try { const { searchParams } = new URL(context.request.url); - const platform = searchParams.get("platform") || "web"; + const platform = searchParams.get("platform") || "browser"; const currentVersion = searchParams.get("currentVersion") || "0.0.1"; // 验证平台参数 - if (!["ios", "android", "web"].includes(platform)) { + if (!["ios", "android", "browser"].includes(platform)) { return new Response( JSON.stringify({ error: "Invalid platform parameter" }), {