This commit is contained in:
2025-08-03 19:04:25 +08:00
parent 6c5016912e
commit 63fc9fa7b5
4 changed files with 8 additions and 10 deletions

View File

@@ -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" {