feat: 新增订单拨号功能,重构订单页与登录页
This commit is contained in:
1 parent
774403785c
commit
411ec8be23
9 files changed
+875
-482
No files matched your search
+6
-2
@@ -7,9 +7,13 @@
|
||||
/// 解析顺序见 [resolveBaseUrl]。
|
||||
abstract final class Env {
|
||||
/// 编译期默认地址,作为兜底方案。
|
||||
///
|
||||
/// 默认值指向当前开发机后端(本机实测 7001 可用)。局域网 IP 变化后,
|
||||
/// 登录页右上角「服务端设置」可直接改,或启动时用
|
||||
/// `--dart-define=API_BASE_URL=http://<IP>:7001/api` 覆盖。
|
||||
static const String apiBaseUrl = String.fromEnvironment(
|
||||
'API_BASE_URL',
|
||||
defaultValue: 'http://192.168.3.29:7001/api',
|
||||
defaultValue: 'http://192.168.21.184:7001/api',
|
||||
);
|
||||
|
||||
static final Uri _default = Uri.parse(apiBaseUrl);
|
||||
@@ -17,7 +21,7 @@ abstract final class Env {
|
||||
/// 默认主机,取自 [apiBaseUrl]。
|
||||
static String get defaultHost => _default.host;
|
||||
|
||||
/// 默认端口,取自 [apiBaseUrl],未显式指定时回落 7007。
|
||||
/// 默认端口,取自 [apiBaseUrl],未显式指定时回落 7001。
|
||||
static int get defaultPort => _default.hasPort ? _default.port : 7001;
|
||||
|
||||
/// 由 IP + 端口拼接 Base URL;协议与路径沿用 [apiBaseUrl],
|
||||
|
||||
Reference in new issue
Block a user