可信代码库-配置文件修复定向URL改为动态获取

This commit is contained in:
fmk1023
2025-08-26 17:52:32 +08:00
parent 9c58b289a2
commit 452eda019a
9 changed files with 22 additions and 11 deletions

View File

@@ -409,7 +409,8 @@ export const xssPurify = (str: string) => DOMPurify.sanitize(str, purifyConfig);
export const messageError = ({ error_message, message }) => Message.error(error_message || message);
export const savePageRef = (fullPath:string) => {
const BASE_URL = (import.meta as any).env.VITE_HOST;
// const BASE_URL = (import.meta as any).env.VITE_HOST;
const BASE_URL = window.location.origin + '/openRepoPortal';
const beforeRef = sessionStorage.getItem('ref');
const ref = beforeRef || document.referrer || '';
window.page_ref = ref;