refactor: ♻️ request 工具类优化

This commit is contained in:
ray
2024-11-13 12:54:07 +08:00
parent d91928e9ed
commit f1598aedfd
4 changed files with 30 additions and 17 deletions

View File

@@ -20,6 +20,18 @@ const AuthAPI = {
});
},
/** 刷新token 接口*/
refreshToken(refreshToken: string) {
return request<any, LoginResult>({
url: `${AUTH_BASE_URL}/refresh-token`,
method: "post",
data: { refreshToken: refreshToken },
headers: {
Authorization: "no-auth",
},
});
},
/** 注销 接口*/
logout() {
return request({

View File

@@ -113,7 +113,7 @@ const UserAPI = {
url: `${USER_BASE_URL}/export`,
method: "get",
params: queryParams,
responseType: "arraybuffer",
responseType: "blob",
});
},