feat:登录
This commit is contained in:
1 parent
8cfe87e31e
commit
2fde3715e3
10 files changed
+32
-221
No files matched your search
@@ -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++;
|
||||
|
||||
Reference in new issue
Block a user