方法一 每次请求: @apiHeader {string} Content-Type 请求数据格式
在接口文档的注释中加入,这样在填写表单时会多一个Content-Type
Content-Type 值填写application/json
方法二 全局:找到apidoc模版send_sample_request.js
一般在C:\Users\电脑用户名\AppData\Roaming\npm\node_modules\apidoc\template\utils
将ajax form表单的提交请求中加入三条
dataType: "json",
contentType: "application/json",
data: JSON.stringify(param),
温馨提示:答案为网友推荐,仅供参考