From 67066d69d6572c762d036d46a911e6e80c44ba19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=96=87=E8=B1=AA?= <980287353@qq.com> Date: Tue, 1 Apr 2025 10:35:22 +0800 Subject: [PATCH] chore:2.0.6 --- package.json | 2 +- src/https/TsHttpUtil.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2dda9bc..cf73bfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tiesheng/npm-tool", - "version": "2.0.5", + "version": "2.0.6", "description": "npm tool package", "main": "index.js", "scripts": { diff --git a/src/https/TsHttpUtil.js b/src/https/TsHttpUtil.js index b354df9..cd46ceb 100644 --- a/src/https/TsHttpUtil.js +++ b/src/https/TsHttpUtil.js @@ -77,8 +77,12 @@ const dealParamsBody = (options) => { } else { if (options.requestType !== 'form') { options.data = {...extraParams, ...options.data,}; - options.data = { - 'encryptData': crypto.encrypt(JSON.stringify(options.data)) + + // 根据属性开启加密 + if (Storage.getEncryptBody()) { + options.data = { + 'encryptData': crypto.encrypt(JSON.stringify(options.data)) + } } } }