Sfoglia il codice sorgente

logo上传失败提示

WANG 6 anni fa
parent
commit
b594976dc3
1 ha cambiato i file con 8 aggiunte e 5 eliminazioni
  1. 8 5
      src/modules/basic/view/school.vue

+ 8 - 5
src/modules/basic/view/school.vue

@@ -629,11 +629,14 @@ export default {
       this.removeFile();
       this.searchForm();
     },
-    uploadError() {
-      this.$notify({
-        message: "上传失败",
-        type: "error"
-      });
+    uploadError(response) {
+      let json = JSON.parse(response.message);
+      if (response.status == 500) {
+        this.$notify({
+          message: json.desc,
+          type: "error"
+        });
+      }
       this.fileLoading = false;
     },
     //确定上传