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 * accessToken
*/ */
export async function refreshTokenApi() { export async function refreshTokenApi() {
return baseRequestClient.post<AuthApi.RefreshTokenResult>('/auth/refresh', { return baseRequestClient.post<AuthApi.RefreshTokenResult>(
withCredentials: true, '/auth/refresh',
}); {},
{ withCredentials: true },
);
} }
/** /**
* 退 * 退
*/ */
export async function logoutApi() { export async function logoutApi() {
return baseRequestClient.post('/auth/logout', { return baseRequestClient.post(
withCredentials: true, '/auth/logout',
}); {},
{ withCredentials: true },
);
} }
/** /**

View File

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

View File

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