fix yushan

This commit is contained in:
2025-08-03 19:18:53 +08:00
parent 63fc9fa7b5
commit f991ad94d3
2 changed files with 9 additions and 5 deletions

View File

@@ -191,7 +191,7 @@ westdex:
# 🌍 羽山配置
# ===========================================
yushan:
url: https://api.yushanshuju.com/credit-gw/service"
url: https://api.yushanshuju.com/credit-gw/service
api_key: "4c566c4a4b543164535455685655316c"
acct_id: "YSSJ843926726"

View File

@@ -103,11 +103,15 @@ 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)
}
retCode := gjson.GetBytes(respData, "retcode").String()
if retCode == "100000" {