Explorar o código

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

cc12458 hai 3 semanas
pai
achega
fd55e7b581
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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: "重新加载中" });