feat(client): pay 支付领域模型 + PaymentApi + 支付流控制器(轮询 activated)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
@@ -91,12 +91,14 @@ class ApiClient {
|
||||
Never _throwFromResponse(http.Response resp) {
|
||||
String zh = '操作失败 (HTTP ${resp.statusCode})';
|
||||
String en = 'Request failed (HTTP ${resp.statusCode})';
|
||||
String? code;
|
||||
try {
|
||||
final b = jsonDecode(resp.body) as Map<String, dynamic>;
|
||||
zh = b['message_zh'] as String? ?? zh;
|
||||
en = b['message_en'] as String? ?? en;
|
||||
code = b['code'] as String?;
|
||||
} catch (_) {}
|
||||
throw AuthApiException(statusCode: resp.statusCode, messageZh: zh, messageEn: en);
|
||||
throw AuthApiException(statusCode: resp.statusCode, messageZh: zh, messageEn: en, code: code);
|
||||
}
|
||||
|
||||
void dispose() => _client.close();
|
||||
|
||||
Reference in New Issue
Block a user