From cb2fa920ea09e766e0aaac26800a2f5d7589ea23 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Mon, 19 Oct 2026 18:27:17 +0800 Subject: [PATCH] =?UTF-8?q?chore(config):=20=E6=9B=B4=E6=96=B0=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E9=BB=98=E8=AE=A4=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/config/app_config.dart | 2 +- test/config/server_endpoint_test.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/config/app_config.dart b/lib/core/config/app_config.dart index c3f9f4e..6c951a7 100644 --- a/lib/core/config/app_config.dart +++ b/lib/core/config/app_config.dart @@ -13,7 +13,7 @@ class AppConfig { /// /// 这个地址跟着电脑所在的网络走,换网络后要用 /// `ipconfig getifaddr en0` 重新确认。默认值只改这一行。 - static const String devHostBaseUrl = 'http://192.168.31.250:8081'; + static const String devHostBaseUrl = 'http://172.18.0.7:8081'; static const String _loopbackBaseUrl = 'http://127.0.0.1:8081'; diff --git a/test/config/server_endpoint_test.dart b/test/config/server_endpoint_test.dart index 1b80f8c..9819363 100644 --- a/test/config/server_endpoint_test.dart +++ b/test/config/server_endpoint_test.dart @@ -57,13 +57,13 @@ void main() { }); test('should_use_the_configured_lan_address_for_device_default', () { - expect(AppConfig.devHostBaseUrl, 'http://192.168.31.250:8081'); + expect(AppConfig.devHostBaseUrl, 'http://172.18.0.7:8081'); }); test('should_apply_stored_url_only_when_debug_is_enabled', () async { SharedPreferencesAsyncPlatform.instance = InMemorySharedPreferencesAsync.withData({ - ServerEndpoint.preferenceKey: ' http://192.168.31.250:8081/ ', + ServerEndpoint.preferenceKey: ' http://172.18.0.7:8081/ ', }); final original = AppConfig.apiBaseUrl; @@ -71,7 +71,7 @@ void main() { expect(AppConfig.apiBaseUrl, original); await ServerEndpoint.load(debug: true); - expect(AppConfig.apiBaseUrl, 'http://192.168.31.250:8081'); + expect(AppConfig.apiBaseUrl, 'http://172.18.0.7:8081'); }); test('should_save_normalized_url_and_clear_override', () async { @@ -81,10 +81,10 @@ void main() { isNull, ); - expect(await ServerEndpoint.save(' http://192.168.31.250:8081/ '), isTrue); + expect(await ServerEndpoint.save(' http://172.18.0.7:8081/ '), isTrue); expect( await SharedPreferencesAsync().getString(ServerEndpoint.preferenceKey), - 'http://192.168.31.250:8081', + 'http://172.18.0.7:8081', ); await ServerEndpoint.clear();