fix: tianyuanapi_sdk

This commit is contained in:
2025-11-10 15:07:35 +08:00
parent f0e579e495
commit 965b7e8678

View File

@@ -95,7 +95,7 @@ type Response struct {
Message string `json:"message"`
Success bool `json:"success"`
TransactionID string `json:"transaction_id"` // 流水号
Data map[string]interface{} `json:"data"` // 解密后的数据
Data interface{} `json:"data"` // 解密后的数据
Timeout int64 `json:"timeout"` // 请求耗时(毫秒)
Error string `json:"error,omitempty"`
}
@@ -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{}
var decryptedMap interface{}
if json.Unmarshal([]byte(decryptedData), &decryptedMap) == nil {
response.Data = decryptedMap
response.Data = decryptedMap
}
}
}