Browse Source

fix(http): 添加refreshTokenOnError的注释提示

如果拦截不到错误,请使用refreshTokenOnSuccess
feige996 7 months ago
parent
commit
fdd28442d0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/http/alova.ts

+ 1 - 0
src/http/alova.ts

@@ -20,6 +20,7 @@ const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthenticati
   typeof VueHook,
   typeof uniappRequestAdapter
 >({
+  // 如果下面拦截不到,请使用 refreshTokenOnSuccess by 群友@琛
   refreshTokenOnError: {
     isExpired: (error) => {
       return error.response?.status === ResultEnum.Unauthorized