post(url, params) { const config = { method: 'post', url: url, headers:{ "Content-type":"application/x-www-form-urlencoded" }, data:qs.stringify(params)||{} };
此时后端似乎不需要在映射请求体 @requestBody 有请求体的话 后端会收不到数据; 这边需要用qs模块来处理一下,听说用 JSON.stringfy()也行,我这边试了一下不行 不知道是不是操作问题。
转自 https://blog.csdn.net/clli_Chain/article/details/107659939