Przeglądaj źródła

修复 登录接口返回 401 导致小程序重新递归请求

cc12458 3 tygodni temu
rodzic
commit
fd55e7b581
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      miniprogram/lib/request/create.ts

+ 1 - 0
miniprogram/lib/request/create.ts

@@ -79,6 +79,7 @@ export function createRequest(option: IRequestCreateConfig) {
 
     return (promise as any).catch(async (error: { errno: string }) => {
       shareRequestCache.delete(key);
+      if (url.endsWith('/authManage/login')) throw error;
       if (error.errno === "060201401") {
         await login(true, "重新登录中");
         wx.showLoading({ title: "重新加载中" });