参考地址:https://www.jb51.net/article/248824.htm
参考文中代码:
文中关键代码修改如下:
return request.post(url, formData, {
transformRequest: [
function(data, headers) {
// 去除post请求默认的Content-Type
delete headers['Content-Type'];
delete headers.post['Content-Type'];
return data;
}
]
});