Forráskód Böngészése

update Vben2/src/utils/http/axios/index.ts.
处理响应状态码

lpspig 4 éve
szülő
commit
9be750ff2d
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      Vben2/src/utils/http/axios/index.ts

+ 1 - 0
Vben2/src/utils/http/axios/index.ts

@@ -153,6 +153,7 @@ const transform: AxiosTransform = {
    * @description: 响应拦截器处理
    */
   responseInterceptors: (res: AxiosResponse<any>) => {
+    checkStatus(res.data.code, res.data.message);
     return res;
   },