完善白名单异常处理与消息提示

This commit is contained in:
2025-04-30 15:19:57 +08:00
parent 5ef673bacb
commit 0ac5679988
4 changed files with 48 additions and 39 deletions

View File

@@ -163,7 +163,7 @@ async function postCall<R = undefined>(rawResp: Promise<ApiResponse<R>>) {
].some(item => item.test(pathname))
if (match && !resp.success && resp.status === 401) {
console.log("!!!!!!!!!redirect", resp.message)
console.log('!!!!!!!!!redirect', '"', pathname, '"', resp.message)
redirect(pathname === '/' ? '/login' : `/login?redirect=${pathname}`)
}