feat: 调整了登录的逻辑
This commit is contained in:
@@ -8,7 +8,6 @@ const oauthToken = (args) => {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
};
|
||||
removeAccessToken();
|
||||
return request.post("/auth/oauth2/token", args, config);
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
|
||||
if (customConfig.noToken) {
|
||||
delete header.Authorization;
|
||||
} else {
|
||||
if (token || customConfig.token) {
|
||||
if (!header.Authorization && (token || customConfig.token)) {
|
||||
header.Authorization = `Bearer ${token || customConfig.token}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user