Kaynağa Gözat

[Fix 0000] 上传文件报错不全问题修复

houzekong 4 gün önce
ebeveyn
işleme
b2ed14310d

+ 6 - 6
src/views/vent/performance/fileDetail/index.vue

@@ -309,14 +309,14 @@
       formData.append('isApprove', formState.isApprove);
       formData.append('fileType', formState.fileType);
       formData.append('filePerm', formState.filePerm);
-      uploadApi(formData)
-        .then(() => {
+      uploadApi(formData).then(({ code, message }) => {
+        if (code !== 200) {
+          createMessage.error(message);
+        } else {
           alive.value = new Date().getTime();
           visible.value = false;
-        })
-        .catch(({ message }) => {
-          createMessage.error(message);
-        });
+        }
+      });
     }
   };
   //取消上传