refactor: 重构API接口响应格式,带来简洁高效的接口设计 (#1256)

This commit is contained in:
xiaoming
2026-01-10 08:58:20 +08:00
committed by GitHub
parent ebc92ba61c
commit f2616fdfaf
30 changed files with 210 additions and 131 deletions

View File

@@ -23,8 +23,8 @@ const submitForm = formEl => {
date: validateForm.date // 别的字段
});
formUpload(formData)
.then(({ success }) => {
if (success) {
.then(({ code }) => {
if (code === 0) {
message("提交成功", { type: "success" });
} else {
message("提交失败");