refactor: simplify noNeedToken judge

This commit is contained in:
张传龙
2022-09-10 15:56:53 +08:00
parent 40483e09e6
commit 2b2a324a62
3 changed files with 3 additions and 9 deletions

View File

@@ -1,10 +1,10 @@
import { getToken } from '@/utils/token'
import { toLogin } from '@/utils/auth'
import { isWithoutToken, resolveResError } from './helpers'
import { resolveResError } from './helpers'
export function reqResolve(config) {
// 处理不需要token的请求
if (isWithoutToken(config)) {
if (config.noNeedToken) {
return config
}