From efb39fe52a9829815bb0b82fb5b920cd3b552c2f Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 14 十月 2025 15:12:34 +0800
Subject: [PATCH] fix: 修改投保方式

---
 src/constants/app.ts |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/constants/app.ts b/src/constants/app.ts
index b435003..cca756e 100644
--- a/src/constants/app.ts
+++ b/src/constants/app.ts
@@ -1 +1,20 @@
 export const AppType = import.meta.env.VITE_AppType || 'other';
+
+export class Platform {
+  static OS = AppType;
+
+  static isJX = Platform.OS === 'jx';
+  static isTP = Platform.OS === 'tp';
+
+  static select<T>(config: Partial<Record<typeof Platform.OS, T>>): T {
+    return config[Platform.OS];
+  }
+
+  static selectWithBase<TBase extends object, T extends object>(
+    base: TBase,
+    config: Partial<Record<typeof Platform.OS, T>>
+  ) {
+    const osConfig = config[Platform.OS] || ({} as T);
+    return { ...base, ...osConfig };
+  }
+}

--
Gitblit v1.9.1