From 728b11c2aaded6d98df48d77a24aad5d8d3b0618 Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 5 Mar 2026 08:12:46 -0800 Subject: [PATCH] =?UTF-8?q?fix(payment-password):=20=E4=BF=AE=E5=A4=8D=20i?= =?UTF-8?q?sPaymentPasswordSet=20=E5=93=8D=E5=BA=94=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API 返回 { success: true, data: { isSet: true } }, 但代码读的是 response.data['isSet'](顶层), 实际应该读 response.data['data']['isSet'](嵌套在 data 下)。 导致 isSet 永远为 null == true → false, 支付密码页面始终显示「设置」模式而非「修改」模式。 Co-Authored-By: Claude Sonnet 4.6 --- frontend/mobile-app/lib/core/services/account_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/mobile-app/lib/core/services/account_service.dart b/frontend/mobile-app/lib/core/services/account_service.dart index 550ae34f..4e87d8e2 100644 --- a/frontend/mobile-app/lib/core/services/account_service.dart +++ b/frontend/mobile-app/lib/core/services/account_service.dart @@ -2136,7 +2136,7 @@ class AccountService { debugPrint('$_tag isPaymentPasswordSet() - 查询支付密码状态'); try { final response = await _apiClient.get('/user/payment-password-status'); - final isSet = response.data['isSet'] == true; + final isSet = response.data['data']['isSet'] == true; debugPrint('$_tag isPaymentPasswordSet() - 结果: $isSet'); return isSet; } catch (e) {