代码优化

This commit is contained in:
BianLzhaoMin 2024-10-08 13:42:33 +08:00
parent be300522e2
commit 300f749dee
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ const service = axios.create({
service.interceptors.request.use( service.interceptors.request.use(
(config) => { (config) => {
const jdCloud = JSON.parse(localStorage.getItem('jdcloud')).token const jdCloud = JSON.parse(localStorage.getItem('jdcloud')).token || null
if (jdCloud) { if (jdCloud) {
config.headers['Authorization'] = jdCloud config.headers['Authorization'] = jdCloud
} }