|
@@ -131,20 +131,20 @@ export const axiosFactory = () => {
|
|
|
hook.before && hook.before(config)
|
|
|
}
|
|
|
|
|
|
- if (!matchURL(axiosConfig.unTokenSet, config)) {
|
|
|
- if (!axiosConfig.token) {
|
|
|
- if (!offline && !matchURL(axiosConfig.unReqErrorSet, config)) {
|
|
|
- const error = new Error('缺少token')
|
|
|
- callErrorHandler('req', error, config)
|
|
|
- throw error
|
|
|
- }
|
|
|
- } else {
|
|
|
- config.headers = {
|
|
|
- ...config.headers,
|
|
|
- token: axiosConfig.token
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (!matchURL(axiosConfig.unTokenSet, config)) {
|
|
|
+ // if (!axiosConfig.token) {
|
|
|
+ // if (!offline && !matchURL(axiosConfig.unReqErrorSet, config)) {
|
|
|
+ // const error = new Error('缺少token')
|
|
|
+ // callErrorHandler('req', error, config)
|
|
|
+ // throw error
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // config.headers = {
|
|
|
+ // ...config.headers,
|
|
|
+ // token: axiosConfig.token
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
return config
|
|
|
}
|
|
|
)
|