Parcourir la source

response error里,加上loading消失

刘洋 il y a 1 an
Parent
commit
ba1ded56dd
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/utils/request.js

+ 3 - 0
src/utils/request.js

@@ -45,6 +45,9 @@ function createService() {
       return response.data;
     },
     (error) => {
+      if (error.config.loading) {
+        LoadingPlugin(false);
+      }
       const err = (text) => {
         Message.error({
           content: