提交 b691a185 编写于 作者: 雪洛's avatar 雪洛

fix: App端 uni.request Content-Type 为 application/json 自动序列化对齐微信小程序

上级 5659fdff
......@@ -99,7 +99,10 @@ class RequestTask {
}
}
export function request (args, callbackId) {
export function request (args, callbackId) {
if (args.method !== 'GET' && args.header['Content-Type'].indexOf('application/json') === 0 && isPlainObject(args.data)) {
args.data = JSON.stringify(args.data)
}
const {
requestTaskId
} = invokeMethod('createRequestTask', args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册