feat. 更新API到4.27.0

This commit is contained in:
IamFurina
2025-08-24 23:08:27 +08:00
committed by ImFurina
parent 0ff650cd50
commit 45609a8806
11 changed files with 125 additions and 12 deletions
+6 -6
View File
@@ -183,13 +183,13 @@ const createRequest = (uri, data, options) => {
if (crypto === 'eapi') {
// 使用eapi加密
data.header = header
data.e_r =
options.e_r != undefined
data.e_r = toBoolean(
options.e_r !== undefined
? options.e_r
: data.e_r != undefined
: data.e_r !== undefined
? data.e_r
: APP_CONF.encryptResponse // 用于加密接口返回值
data.e_r = toBoolean(data.e_r)
: APP_CONF.encryptResponse,
) // 用于加密接口返回值
encryptData = encrypt.eapi(uri, data)
url = APP_CONF.apiDomain + '/eapi/' + uri.substr(5)
} else if (crypto === 'api') {
@@ -259,7 +259,7 @@ const createRequest = (uri, data, options) => {
x.replace(/\s*Domain=[^(;|$)]+;*/, ''),
)
try {
if (data.e_r) {
if (crypto === 'eapi' && data.e_r) {
// eapi接口返回值被加密,需要解密
answer.body = encrypt.eapiResDecrypt(
body.toString('hex').toUpperCase(),