diff --git a/client/lib/core/config/app_config.dart b/client/lib/core/config/app_config.dart index d589c75..fb1f271 100644 --- a/client/lib/core/config/app_config.dart +++ b/client/lib/core/config/app_config.dart @@ -1,22 +1,20 @@ /// 集中管理应用配置,通过 --dart-define=KEY=value 注入环境变量 /// -/// 开发默认值:http://localhost:8080 -/// 生产部署示例:flutter run \ -/// --dart-define=BASE_URL=http://192.168.1.100:8080 \ -/// --dart-define=SHOP_NAME=强朋友名酒行 \ -/// --dart-define=SHOP_ADDRESS=贵州省贵阳市云岩区中华北路88号 \ -/// --dart-define=SHOP_PHONE=0851-12345678 +/// 默认值 = 线上服务(jiu.51yanmei.com):本地 flutter run 不带 define 也连生产。 +/// 需连本地后端时显式覆盖:flutter run \ +/// --dart-define=BASE_URL=http://localhost:8080 \ +/// --dart-define=PUBLIC_URL=http://localhost:8081 class AppConfig { const AppConfig._(); static const _baseUrl = String.fromEnvironment( 'BASE_URL', - defaultValue: 'http://localhost:8080', + defaultValue: 'https://jiu.51yanmei.com', ); static const _publicUrl = String.fromEnvironment( 'PUBLIC_URL', - defaultValue: 'http://localhost:8081', + defaultValue: 'https://jiu.51yanmei.com', ); static const shopName = String.fromEnvironment(