Browse Source

fix: 修复封装的axios请求过快beforeRequestCallback只触发一次

xiaoxian521 3 years ago
parent
commit
3389f3118a
1 changed files with 0 additions and 1 deletions
  1. 0 1
      src/utils/http/core.ts

+ 0 - 1
src/utils/http/core.ts

@@ -128,7 +128,6 @@ class EnclosureHttp {
         // 优先判断post/get等方法是否传入回掉,否则执行初始化设置等回掉
         if (typeof this.beforeRequestCallback === "function") {
           this.beforeRequestCallback($config);
-          this.beforeRequestCallback = undefined;
           return $config;
         }
         if (EnclosureHttp.initConfig.beforeRequestCallback) {