fix(payment-password): 修复 isPaymentPasswordSet 响应解析错误

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 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-05 08:12:46 -08:00
parent 5752f7b545
commit 728b11c2aa
1 changed files with 1 additions and 1 deletions

View File

@ -2136,7 +2136,7 @@ class AccountService {
debugPrint('$_tag isPaymentPasswordSet() - 查询支付密码状态'); debugPrint('$_tag isPaymentPasswordSet() - 查询支付密码状态');
try { try {
final response = await _apiClient.get('/user/payment-password-status'); 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'); debugPrint('$_tag isPaymentPasswordSet() - 结果: $isSet');
return isSet; return isSet;
} catch (e) { } catch (e) {