This commit is contained in:
2025-11-10 15:04:40 +08:00
parent 800d21bace
commit 13068fe49a
2 changed files with 11 additions and 11 deletions

View File

@@ -2670,7 +2670,7 @@ func (a *ApiRequestService) ProcessIVYZ3P9MRequest(ctx context.Context, params [
jsonResult, err := json.Marshal(resp.Data) jsonResult, err := json.Marshal(resp.Data)
if err != nil { if err != nil {
return nil, fmt.Errorf("处理反诈反赌核验查询结果失败: %v", err) return nil, fmt.Errorf("处理学历实时查询结果失败: %v", err)
} }
return &APIInternalResult{ return &APIInternalResult{
Data: jsonResult, Data: jsonResult,

View File

@@ -91,13 +91,13 @@ type ApiResponse struct {
// Response Call方法的响应 // Response Call方法的响应
type Response struct { type Response struct {
Code int `json:"code"` Code int `json:"code"`
Message string `json:"message"` Message string `json:"message"`
Success bool `json:"success"` Success bool `json:"success"`
TransactionID string `json:"transaction_id"` // 流水号 TransactionID string `json:"transaction_id"` // 流水号
Data map[string]interface{} `json:"data"` // 解密后的数据 Data interface{} `json:"data"` // 解密后的数据(支持对象或数组)
Timeout int64 `json:"timeout"` // 请求耗时(毫秒) Timeout int64 `json:"timeout"` // 请求耗时(毫秒)
Error string `json:"error,omitempty"` Error string `json:"error,omitempty"`
} }
// NewClient 创建新的客户端实例 // NewClient 创建新的客户端实例
@@ -243,9 +243,9 @@ func (c *Client) Call(req Request) (*Response, error) {
if apiResp.Data != "" { if apiResp.Data != "" {
decryptedData, err := c.decrypt(apiResp.Data) decryptedData, err := c.decrypt(apiResp.Data)
if err == nil { if err == nil {
var decryptedMap map[string]interface{} var decrypted interface{}
if json.Unmarshal([]byte(decryptedData), &decryptedMap) == nil { if json.Unmarshal([]byte(decryptedData), &decrypted) == nil {
response.Data = decryptedMap response.Data = decrypted
} }
} }
} }