Explorar el Código

泛化请求时间延长

zhangliang2 hace 2 años
padre
commit
a29034c0e1

+ 5 - 1
src/axios/filter.js

@@ -123,7 +123,11 @@ instance.interceptors.request.use(function (config) {
     // 在发送请求之前处理
     // 判断token在前台session中是否存在
     config.headers.common['Authorization'] = localStorage.getItem('Authorization');
-    showFullScreenLoading();
+    if (config.noLoading === true) { //如果noLoading为true,不加载loading画面
+        console.log("noLoading");
+    } else {
+        showFullScreenLoading();
+    }
     return config;
 }, function (error) {
     // 对请求错误做处理

+ 1 - 1
src/views/sceneLibrary/components/generalizationDetail.vue

@@ -1557,7 +1557,7 @@ export default {
                 };
                 this.$emit("generalizationBegin");
 
-                this.$axios({
+                this.$instance({
                     method: "post",
                     noLoading: true,
                     url: this.$api.sceneLibrary.saveSceneGeneralExample,