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:
parent
cc5f5f587b
commit
27bcfde6c9
@ -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 },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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,
|
||||
},
|
||||
},
|
||||
|
||||
@ -12,9 +12,9 @@ interface UserInfo extends BasicUserInfo {
|
||||
homePath: string;
|
||||
|
||||
/**
|
||||
* accessToken
|
||||
* accessToken(登录时由 loginApi 单独返回,userInfo 可选)
|
||||
*/
|
||||
token: string;
|
||||
token?: string;
|
||||
}
|
||||
|
||||
export type { UserInfo };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user