fix
This commit is contained in:
@@ -2670,7 +2670,7 @@ func (a *ApiRequestService) ProcessIVYZ3P9MRequest(ctx context.Context, params [
|
||||
|
||||
jsonResult, err := json.Marshal(resp.Data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("处理反诈反赌核验查询结果失败: %v", err)
|
||||
return nil, fmt.Errorf("处理学历实时查询结果失败: %v", err)
|
||||
}
|
||||
return &APIInternalResult{
|
||||
Data: jsonResult,
|
||||
|
||||
@@ -91,13 +91,13 @@ type ApiResponse struct {
|
||||
|
||||
// Response Call方法的响应
|
||||
type Response struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Success bool `json:"success"`
|
||||
TransactionID string `json:"transaction_id"` // 流水号
|
||||
Data map[string]interface{} `json:"data"` // 解密后的数据
|
||||
Timeout int64 `json:"timeout"` // 请求耗时(毫秒)
|
||||
Error string `json:"error,omitempty"`
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Success bool `json:"success"`
|
||||
TransactionID string `json:"transaction_id"` // 流水号
|
||||
Data interface{} `json:"data"` // 解密后的数据(支持对象或数组)
|
||||
Timeout int64 `json:"timeout"` // 请求耗时(毫秒)
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// NewClient 创建新的客户端实例
|
||||
@@ -243,9 +243,9 @@ func (c *Client) Call(req Request) (*Response, error) {
|
||||
if apiResp.Data != "" {
|
||||
decryptedData, err := c.decrypt(apiResp.Data)
|
||||
if err == nil {
|
||||
var decryptedMap map[string]interface{}
|
||||
if json.Unmarshal([]byte(decryptedData), &decryptedMap) == nil {
|
||||
response.Data = decryptedMap
|
||||
var decrypted interface{}
|
||||
if json.Unmarshal([]byte(decryptedData), &decrypted) == nil {
|
||||
response.Data = decrypted
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user