From 300f749deec4b52f2d3c0c6592a7a198fb257761 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 8 Oct 2024 13:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/http/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }