代码优化
This commit is contained in:
parent
be300522e2
commit
300f749dee
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue