SAP打包配置修改
This commit is contained in:
@@ -107,7 +107,7 @@ onMounted(() => {
|
||||
/** mobile暂定全部重定向为首页 */
|
||||
addEventListener('notice', toNotice);
|
||||
window.addEventListener('message', (event) => {
|
||||
let VITE_HOST = window.location.origin + '/tcode';
|
||||
let VITE_HOST = window.location.origin + '/SAP';
|
||||
// if (event.origin === (import.meta as any).env.VITE_HOST) {
|
||||
if (event.origin === VITE_HOST) {
|
||||
if (event.data.type === 'success') {
|
||||
|
||||
@@ -5,7 +5,7 @@ import error404 from './data/error-404.json';
|
||||
import error503 from './data/error-503.json';
|
||||
|
||||
// lottie动画图片资源路径
|
||||
export const assetsPath = `/tcode/static/images/`;
|
||||
export const assetsPath = `/SAP/static/images/`;
|
||||
|
||||
export const defaultRender = 'canvas';
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export const injectRouter = (router) => {
|
||||
|
||||
// 上报ref设置
|
||||
// const BASE_URL = (import.meta as any).env.VITE_HOST;
|
||||
const BASE_URL = window.location.origin + '/tcode';
|
||||
const BASE_URL = window.location.origin + '/SAP';
|
||||
const beforeRef = sessionStorage.getItem('ref');
|
||||
const ref = beforeRef || document.referrer || '';
|
||||
if (!fromHomeWeb.includes(to.name)) {
|
||||
|
||||
@@ -410,7 +410,7 @@ export const messageError = ({ error_message, message }) => Message.error(error_
|
||||
|
||||
export const savePageRef = (fullPath:string) => {
|
||||
// const BASE_URL = (import.meta as any).env.VITE_HOST;
|
||||
const BASE_URL = window.location.origin + '/tcode';
|
||||
const BASE_URL = window.location.origin + '/SAP';
|
||||
const beforeRef = sessionStorage.getItem('ref');
|
||||
const ref = beforeRef || document.referrer || '';
|
||||
window.page_ref = ref;
|
||||
|
||||
@@ -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}/tcode${path || '/'}`;
|
||||
window.location.href = `${window.location.origin}/SAP${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 + '/tcode');
|
||||
}, window.location.origin + '/SAP');
|
||||
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}/tcode${redirectUrl}`;
|
||||
const returnUrl = `${window.location.origin}/SAP${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}`;
|
||||
|
||||
@@ -142,7 +142,7 @@ const createOrgItem = {
|
||||
orgUrl: {
|
||||
label: '组织URL',
|
||||
// prefix: `${(import.meta as any).env.VITE_HOST}/`,
|
||||
prefix: `${window.location.origin}/tcode/`,
|
||||
prefix: `${window.location.origin}/SAP/`,
|
||||
placeholder: '请输入',
|
||||
occupied: 'namespace已被使用',
|
||||
ruleDesc: {
|
||||
|
||||
Reference in New Issue
Block a user