Commit 636b3275 authored by 费陶勇's avatar 费陶勇

fix: upload组件修改文件上传后判断的状态码

在调用uni.uploadFile时,进入success回调函数后根据判断的新增了一个http状态码 201,方便部分服务端根据RESTful api规范设计api
parent ead9b90c
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
formData: this.formData, formData: this.formData,
header: this.header, header: this.header,
success: (res) => { success: (res) => {
if (res.statusCode != 200) { if (![200,201].includes(res.statusCode)) {
this.uploadError(index, res.data); this.uploadError(index, res.data);
} else { } else {
// 上传成功 // 上传成功
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment