fix(mobile-app): 修复签署合同请求字段名与后端不匹配
- signatureImage → signatureBase64
- 添加 signatureHash 字段
- 将 deviceInfo 包装成对象格式 {deviceId, platform}
- 将 latitude/longitude 包装成 location 对象
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
accc043ff0
commit
a2f021fe94
|
|
@ -346,12 +346,15 @@ class ContractSigningService {
|
|||
debugPrint('[ContractSigningService] Base64 长度: ${signatureBase64.length}');
|
||||
|
||||
final requestData = {
|
||||
'signatureImage': signatureBase64,
|
||||
'ipAddress': ipAddress,
|
||||
'deviceInfo': deviceInfo,
|
||||
'userAgent': userAgent,
|
||||
'latitude': latitude,
|
||||
'longitude': longitude,
|
||||
'signatureBase64': signatureBase64, // 后端期望的字段名
|
||||
'signatureHash': '', // TODO: 计算签名哈希
|
||||
'deviceInfo': {
|
||||
'deviceId': deviceInfo ?? 'unknown',
|
||||
'platform': 'android',
|
||||
},
|
||||
'location': latitude != null && longitude != null
|
||||
? {'latitude': latitude, 'longitude': longitude}
|
||||
: null,
|
||||
};
|
||||
debugPrint('[ContractSigningService] 请求 URL: /planting/contract-signing/tasks/$orderNo/sign');
|
||||
|
||||
|
|
@ -406,12 +409,15 @@ class ContractSigningService {
|
|||
debugPrint('[ContractSigningService] Base64 长度: ${signatureBase64.length}');
|
||||
|
||||
final requestData = {
|
||||
'signatureImage': signatureBase64,
|
||||
'ipAddress': ipAddress,
|
||||
'deviceInfo': deviceInfo,
|
||||
'userAgent': userAgent,
|
||||
'latitude': latitude,
|
||||
'longitude': longitude,
|
||||
'signatureBase64': signatureBase64, // 后端期望的字段名
|
||||
'signatureHash': '', // TODO: 计算签名哈希
|
||||
'deviceInfo': {
|
||||
'deviceId': deviceInfo ?? 'unknown',
|
||||
'platform': 'android',
|
||||
},
|
||||
'location': latitude != null && longitude != null
|
||||
? {'latitude': latitude, 'longitude': longitude}
|
||||
: null,
|
||||
};
|
||||
debugPrint('[ContractSigningService] 请求 URL: /planting/contract-signing/tasks/$orderNo/late-sign');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue