feat:登录

This commit is contained in:
dzc committed 2025-01-06 19:09:03 +08:00
1 parent 8cfe87e31e
commit 2fde3715e3
10 files changed
+32 -221

No files matched your search

+7 -4
View File
@@ -38,8 +38,6 @@ const http = new Request({
header: {
Accept: "*/*",
"Content-Type": "application/json;charset=UTF-8",
Authorization: "",
"TENANT-ID": "",
},
withCredentials: true,
custom: options,
@@ -56,8 +54,13 @@ http.interceptors.request.use(
config_header["CLIENT-TOC"] = "Y";
}
config_header["TENANT-ID"] = "1";
if (tokenStorage && tokenStorage.access_token && config_header) {
config_header.Authorization = tokenStorage.access_token;
if (
config.url != "/sys/auth/refresh-token" &&
tokenStorage &&
tokenStorage.access_token &&
config_header
) {
config_header.Authorization = `Bearer ${tokenStorage.access_token}`;
}
if (config.custom && config.custom.showLoading) {
LoadingInstance.count++;