fix: tianyuanapi_sdk
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user