提交 14cfd5cd 编写于 作者: fxy060608's avatar fxy060608

build uni-app-plus-nvue

上级 51b68fb4
......@@ -2647,8 +2647,12 @@ var serviceContext = (function () {
header: {
type: Object,
validator (value, params) {
params.header = value || {};
params.header['content-type'] = params.header['content-type'] || 'application/json';
const header = params.header = value || {};
if (params.method !== method.GET) {
if (!Object.keys(header).find(key => key.toLowerCase() === 'content-type')) {
header['Content-Type'] = 'application/json';
}
}
}
},
dataType: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册