From 862b87d5d1725c0a25b0ccc3cde51a063f73a256 Mon Sep 17 00:00:00 2001 From: liyi Date: Mon, 4 Aug 2025 15:25:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=90=8E=E8=BF=98=E6=9C=89loading=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/network/api_provider.dart | 24 ++++++++++++++---------- lib/network/api_repository.dart | 7 +++++-- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lib/network/api_provider.dart b/lib/network/api_provider.dart index 0325b302..af23be71 100755 --- a/lib/network/api_provider.dart +++ b/lib/network/api_provider.dart @@ -428,11 +428,17 @@ class ApiProvider extends BaseProvider { isUnShowLoading: isUnShowLoading); // 获取所有锁设置信息 - Future getLockSettingInfoData(String lockId) => post( - getLockSettingURL.toUrl, - jsonEncode({ - 'lockId': lockId, - })); + Future getLockSettingInfoData( + String lockId, { + bool isUnShowLoading = true, + }) => + post( + getLockSettingURL.toUrl, + jsonEncode({ + 'lockId': lockId, + }), + isUnShowLoading: isUnShowLoading, + ); // 获取所有锁设置信息 Future getLockSettingInfoDataIsNotLoadingIcon(String lockId) => @@ -2824,9 +2830,9 @@ class ApiProvider extends BaseProvider { /// 设置语音包 Future reportBuyRequest( - int lockId, - String type, - ) => + int lockId, + String type, + ) => post( reportBuyRequestURL.toUrl, jsonEncode({ @@ -2836,8 +2842,6 @@ class ApiProvider extends BaseProvider { isShowNetworkErrorMsg: false, isShowErrMsg: false, isUnShowLoading: true); - - } extension ExtensionString on String { diff --git a/lib/network/api_repository.dart b/lib/network/api_repository.dart index f3e2587a..b9ecd53e 100755 --- a/lib/network/api_repository.dart +++ b/lib/network/api_repository.dart @@ -493,8 +493,11 @@ class ApiRepository { // 获取所有锁设置信息 Future getLockSettingInfoData( - {required String lockId}) async { - final res = await apiProvider.getLockSettingInfoData(lockId); + {required String lockId, bool isUnShowLoading = false}) async { + final res = await apiProvider.getLockSettingInfoData( + lockId, + isUnShowLoading: isUnShowLoading, + ); return LockSetInfoEntity.fromJson(res.body); }