fix
This commit is contained in:
@@ -103,15 +103,11 @@ func (y *YushanService) CallAPI(code string, params map[string]interface{}) (res
|
||||
|
||||
var respData []byte
|
||||
|
||||
if IsJSON(string(body)) {
|
||||
respData = body
|
||||
} else {
|
||||
sDec, err := base64.StdEncoding.DecodeString(string(body))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %s", ErrSystem, err.Error())
|
||||
}
|
||||
respData = y.AES_CBC_Decrypt(sDec, key)
|
||||
sDec, err := base64.StdEncoding.DecodeString(string(body))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %s", ErrSystem, err.Error())
|
||||
}
|
||||
respData = y.AES_CBC_Decrypt(sDec, key)
|
||||
retCode := gjson.GetBytes(respData, "retcode").String()
|
||||
|
||||
if retCode == "100000" {
|
||||
|
||||
Reference in New Issue
Block a user