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)) + } } } }