From 237a32aadb51f4c7f51d4734f6e62663f8acde36 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期六, 08 四月 2023 17:02:18 +0800 Subject: [PATCH] 修复多个bug --- api/index.js | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/api/index.js b/api/index.js index 540f8bb..3d4d824 100644 --- a/api/index.js +++ b/api/index.js @@ -11,6 +11,9 @@ }, jsonPOST: { "Content-type": 'application/json' + }, + utfPOSt: { + 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' } } @@ -45,6 +48,10 @@ opt.header = typeObj['headerPOST']; } else if (urlType == 'json') { opt.header = typeObj['jsonPOST']; + opt.data = params; + } else if (urlType == 'utf8') { + opt.header = typeObj['utfPOSt']; + opt.data = params; } else { opt.data = params; opt.header = typeObj['headerPOST']; -- Gitblit v1.9.1