|
@@ -1,5 +1,4 @@
|
|
|
import { CapacitorConfig } from '@capacitor/cli';
|
|
|
-import { updateVersion } from './scripts/sync-version';
|
|
|
|
|
|
|
|
|
|
|
@@ -11,7 +10,7 @@ console.log("import.meta.env=", process.env.DAPP_BUILD)
|
|
|
const config: CapacitorConfig = {
|
|
|
appId: 'com.acc.app',
|
|
|
appName: 'AngelTokens',
|
|
|
- webDir: 'dist',
|
|
|
+ webDir: 'dist',
|
|
|
// 插件配置
|
|
|
plugins: {
|
|
|
CapacitorAssets: {
|
|
@@ -27,7 +26,7 @@ const config: CapacitorConfig = {
|
|
|
autoUpdate: false, // 自行控制
|
|
|
statsUrl: '', // 统计上报: POST /api/stats 接收 JSON(内容是插件的事件日志),返回 200 即可。
|
|
|
},
|
|
|
- LocalNotifications: {
|
|
|
+ LocalNotifications: {
|
|
|
sound: "" // 为空:使用默认的系统通知声音。如果未提供,则 Android 系统将发出默认声音,iOS 系统则不发出声音。
|
|
|
}
|
|
|
},
|
|
@@ -38,7 +37,7 @@ const config: CapacitorConfig = {
|
|
|
},
|
|
|
|
|
|
// Android专属配置
|
|
|
- android: {
|
|
|
+ android: {
|
|
|
allowMixedContent: true, // 允许混合HTTP/HTTPS内容
|
|
|
useLegacyBridge: true, // 使用旧版桥接(兼容性)
|
|
|
|
|
@@ -58,8 +57,11 @@ if (process.env.DAPP_BUILD != "1") {
|
|
|
cleartext: true, // 允许HTTP明文通信(仅开发环境)
|
|
|
allowNavigation: ['*'] // 允许任意URL导航
|
|
|
}
|
|
|
-}else{
|
|
|
- updateVersion()
|
|
|
+} else {
|
|
|
+ (async () => {
|
|
|
+ const { updateVersion } = await import('./scripts/sync-version.js');
|
|
|
+ updateVersion();
|
|
|
+ })();
|
|
|
}
|
|
|
|
|
|
|