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
|
* 刷新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 },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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 };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user