调试:本地测试不加密

This commit is contained in:
luying
2021-03-12 11:04:42 +08:00
parent 3ca574dd04
commit 49cba48d4f
4 changed files with 14 additions and 0 deletions

View File

@@ -31,6 +31,14 @@ module.exports = options => {
const encodeStr = aesEncrypt(JSON.stringify(reqBody), ENCRYPT_KEY, ENCRYPT_IV);
console.log(`encoded str: ${encodeStr}`);
}
console.log(ctx.app.config.decodeParm)
if(ctx.app.config.decodeParm == false) {
await next();
return;
}
if (!reqBody.data) return;
const decodeStr = aesDecrypt(reqBody.data, ENCRYPT_KEY, ENCRYPT_IV);