This commit is contained in:
2023-07-30 02:47:13 +08:00
parent 4afdd098a5
commit ac581a56b2
11 changed files with 44 additions and 26 deletions

View File

@@ -345,10 +345,12 @@ export default {
const formData = new FormData();
for (const [key, _item] of Object.entries(this.post)) {
if (key == "body") {
formData.append(key, JSON.stringify(_item));
} else {
formData.append(key, _item);
if (_item != null) {
if (key == "body") {
formData.append(key, JSON.stringify(_item));
} else {
formData.append(key, _item);
}
}
}