openRepoPortalV2打包命名修改
This commit is contained in:
@@ -96,7 +96,7 @@ const emitEvents = (type: 'success' | 'fail' = 'success', error_info?: string, p
|
||||
// 登录后回到登录前页面 hack一下automgit跳转
|
||||
if (route.query?.installation_id) {
|
||||
// window.location.href = `${(import.meta as any).env.VITE_HOST}${path || '/'}`;
|
||||
window.location.href = `${window.location.origin}/openRepoPortal${path || '/'}`;
|
||||
window.location.href = `${window.location.origin}/openRepoPortalV2${path || '/'}`;
|
||||
} else {
|
||||
url && localStorage.removeItem('loginReturnUrl');
|
||||
url ? window.location.href = url : router.replace('/');
|
||||
@@ -121,7 +121,7 @@ const emitEvents = (type: 'success' | 'fail' = 'success', error_info?: string, p
|
||||
message: error_info || type === 'success' ? '' : '你已取消授权',
|
||||
path
|
||||
// }, (import.meta as any).env.VITE_HOST);
|
||||
}, window.location.origin + '/openRepoPortal');
|
||||
}, window.location.origin + '/openRepoPortalV2');
|
||||
window?.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ const login = () => {
|
||||
} else {
|
||||
const type = loginType.includes(route?.query?.type) ? route?.query?.type : 'csdn';
|
||||
// const returnUrl = `${(import.meta as any).env.VITE_HOST}${redirectUrl}`;
|
||||
const returnUrl = `${window.location.origin}/openRepoPortal${redirectUrl}`;
|
||||
const returnUrl = `${window.location.origin}/openRepoPortalV2${redirectUrl}`;
|
||||
// 保存登录前页面地址
|
||||
localStorage.setItem('loginReturnUrl', returnUrl || '');
|
||||
const url = `${(import.meta as any).env.VITE_API_HOST}${(import.meta as any).env.VITE_PASSPORT_PREFIX || ''}/api/v1/oauth/login/${type}`;
|
||||
|
||||
Reference in New Issue
Block a user