refactor: 分页响应数据结构调整
This commit is contained in:
@@ -172,13 +172,14 @@ function handleUpload(options: UploadRequestOptions) {
|
||||
if (fileItem) {
|
||||
fileItem.percentage = percent;
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
resolve(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
}).then(
|
||||
(data) => {
|
||||
resolve(data);
|
||||
},
|
||||
(err) => {
|
||||
reject(err);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -156,13 +156,14 @@ function handleUpload(options: UploadRequestOptions) {
|
||||
formData.append(key, props.data[key]);
|
||||
});
|
||||
|
||||
FileAPI.upload(formData)
|
||||
.then((data) => {
|
||||
FileAPI.upload(formData).then(
|
||||
(data) => {
|
||||
resolve(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
},
|
||||
(error) => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -137,13 +137,14 @@ function handleUpload(options: UploadRequestOptions) {
|
||||
formData.append(key, props.data[key]);
|
||||
});
|
||||
|
||||
FileAPI.upload(formData)
|
||||
.then((data) => {
|
||||
FileAPI.upload(formData).then(
|
||||
(data) => {
|
||||
resolve(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
},
|
||||
(error) => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user