修复检查更新日志展示

This commit is contained in:
whyour
2021-10-18 17:05:38 +08:00
parent 51869b6a84
commit ef9fa02145
5 changed files with 80 additions and 9 deletions
+9 -1
View File
@@ -33,10 +33,18 @@ const errorHandler = function (error: any) {
};
const _request = extend({ timeout: 60000, params: { t: time }, errorHandler });
const apiWhiteList = [
'/api/login',
'/open/auth/token',
'/api/user/two-factor/login',
'/api/system',
'/api/init/user',
'/api/init/notification',
];
_request.interceptors.request.use((url, options) => {
const token = localStorage.getItem(config.authKey);
if (token) {
if (token && !apiWhiteList.includes(url)) {
const headers = {
Authorization: `Bearer ${token}`,
};