Skip to content

Commit

Permalink
chore: 优化提示信息, 只有 POST、PUT 等请求允许带body
Browse files Browse the repository at this point in the history
  • Loading branch information
Manweill committed Jan 23, 2024
1 parent 5c8fa09 commit ba62651
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/templates/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,13 @@ function requestBodyString(method: string, parsedParameters: [], bodyParameter:
${contentType === 'multipart/form-data' ? formData : ''}
configs.data = data;`
}
return `/** 适配移动开发(iOS13 等版本),只有 POST、PUT 等请求允许带body */ \n
console.warn('适配移动开发(iOS13 等版本),只有 POST、PUT 等请求允许带body')
`
else {
if (bodyParameter && bodyParameter.length > 0 || !!requestBody) {
return `/** 适配移动开发(iOS13 等版本),只有 POST、PUT 等请求允许带body */ \n
console.warn('适配移动开发(iOS13 等版本),只有 POST、PUT 等请求允许带body')
`
}
}
}

/** serviceTemplate */
Expand Down

0 comments on commit ba62651

Please sign in to comment.