From a66092dea02c7ab120356e433b66e20d99a11e29 Mon Sep 17 00:00:00 2001 From: yangchunlong <292345300@qq.com> Date: Wed, 26 Mar 2025 17:17:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B5=8B=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 9 +++++++++ src/components/rulesForm/index.vue | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 42219a6..2a9fcea 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -73,6 +73,15 @@ class RequestHttp { tryHideFullScreenLoading(); //获取导出表格名称 getDispositionName(response); + // 获取响应头中的 Authorization 信息 + const authorization = response.headers["Authorization"]; + if (authorization) { + // 可以在这里更新用户的 token 信息 + const userStore = useUserStore(); + userStore.setToken(authorization); + return data; + } + //0正常,1非正常 if (data.code == 1) { ElMessage.error(data.msg); diff --git a/src/components/rulesForm/index.vue b/src/components/rulesForm/index.vue index 9c251e4..35f1750 100644 --- a/src/components/rulesForm/index.vue +++ b/src/components/rulesForm/index.vue @@ -92,8 +92,9 @@ :placeholder="item.placeholder" clearable :disabled="item.disabled" - format="YYYY/MM/DD hh:mm:ss" - value-format="YYYY-MM-DD hh:mm:ss" + format="YYYY-MM-DD HH:mm:ss" + date-format="MMM DD, YYYY" + time-format="HH:mm" />