fix: Jenkinsfile 直接下载 Node.js 二进制 + 前端对接调整

- Jenkinsfile: 从 nodejs.org 下载 Node.js 二进制(容器无法访问 GitHub)
- vite.config.ts: 代理目标改为后端实际端口 5211,去掉 rewrite
- auth.ts: withCredentials 移到 axios config 正确位置
This commit is contained in:
xiangning 2026-05-11 02:43:23 +08:00
parent cc5f5f587b
commit 27bcfde6c9
3 changed files with 13 additions and 11 deletions

View File

@ -29,18 +29,22 @@ export async function loginApi(data: AuthApi.LoginParams) {
* accessToken
*/
export async function refreshTokenApi() {
return baseRequestClient.post<AuthApi.RefreshTokenResult>('/auth/refresh', {
withCredentials: true,
});
return baseRequestClient.post<AuthApi.RefreshTokenResult>(
'/auth/refresh',
{},
{ withCredentials: true },
);
}
/**
* 退
*/
export async function logoutApi() {
return baseRequestClient.post('/auth/logout', {
withCredentials: true,
});
return baseRequestClient.post(
'/auth/logout',
{},
{ withCredentials: true },
);
}
/**

View File

@ -8,9 +8,7 @@ export default defineConfig(async () => {
proxy: {
'/api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
// mock代理目标地址
target: 'http://localhost:5320/api',
target: 'http://localhost:5211',
ws: true,
},
},

View File

@ -12,9 +12,9 @@ interface UserInfo extends BasicUserInfo {
homePath: string;
/**
* accessToken
* accessToken loginApi userInfo
*/
token: string;
token?: string;
}
export type { UserInfo };