diff --git a/src/http/index.ts b/src/http/index.ts index 8a5324f..e2f7fdb 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -16,7 +16,7 @@ const service = axios.create({ service.interceptors.request.use( (config) => { - const jdCloud = JSON.parse(localStorage.getItem('jdcloud')).token + const jdCloud = JSON.parse(localStorage.getItem('jdcloud')).token || null if (jdCloud) { config.headers['Authorization'] = jdCloud }