|
@@ -71,24 +71,24 @@ export function getCurrentSite(): any {
|
|
|
|
|
|
|
|
// 定义本地开发环境的域名映射关系
|
|
// 定义本地开发环境的域名映射关系
|
|
|
// 确保你的 hosts 文件已经配置了这些域名指向 127.0.0.1
|
|
// 确保你的 hosts 文件已经配置了这些域名指向 127.0.0.1
|
|
|
- if (host === 'www.yingpai365.com' || host === 'localhost') return 'www'; // 兼容未配hosts的情况
|
|
|
|
|
- if (host === 'b.yingpai365.com') return 'b';
|
|
|
|
|
- if (host === 'mro.yingpai365.com') return 'mro';
|
|
|
|
|
- if (host === 'fuli.yingpai365.com') return 'fuli';
|
|
|
|
|
- if (host === 'reg.yingpai365.com') return 'reg';
|
|
|
|
|
- if (host === 'breg.yingpai365.com') return 'breg';
|
|
|
|
|
- if (host === 'greg.yingpai365.com') return 'greg';
|
|
|
|
|
- if (host === 'passport.yingpai365.com') return 'passport';
|
|
|
|
|
- if (host === 'search.yingpai365.com') return 'search';
|
|
|
|
|
- if (host === 'item.yingpai365.com') return 'item';
|
|
|
|
|
- if (host === 'cart.yingpai365.com') return 'cart';
|
|
|
|
|
- if (host === 'trad.yingpai365.com') return 'trad';
|
|
|
|
|
- if (host === 'payc.yingpai365.com') return 'payc';
|
|
|
|
|
- if (host === 'order.yingpai365.com') return 'order';
|
|
|
|
|
- if (host === 'plan.yingpai365.com') return 'plan';
|
|
|
|
|
- if (host === 'plan_info.yingpai365.com') return 'plan_info';
|
|
|
|
|
- if (host === 'i.yingpai365.com') return 'i';
|
|
|
|
|
- if (host === 'easybuv.yingpai365.com') return 'easybuv';
|
|
|
|
|
|
|
+ if (host === 'www.xiaoluwebsite.xyz' || host === 'localhost') return 'www'; // 兼容未配hosts的情况
|
|
|
|
|
+ if (host === 'b.xiaoluwebsite.xyz') return 'b';
|
|
|
|
|
+ if (host === 'mro.xiaoluwebsite.xyz') return 'mro';
|
|
|
|
|
+ if (host === 'fuli.xiaoluwebsite.xyz') return 'fuli';
|
|
|
|
|
+ if (host === 'reg.xiaoluwebsite.xyz') return 'reg';
|
|
|
|
|
+ if (host === 'breg.xiaoluwebsite.xyz') return 'breg';
|
|
|
|
|
+ if (host === 'greg.xiaoluwebsite.xyz') return 'greg';
|
|
|
|
|
+ if (host === 'passport.xiaoluwebsite.xyz') return 'passport';
|
|
|
|
|
+ if (host === 'search.xiaoluwebsite.xyz') return 'search';
|
|
|
|
|
+ if (host === 'item.xiaoluwebsite.xyz') return 'item';
|
|
|
|
|
+ if (host === 'cart.xiaoluwebsite.xyz') return 'cart';
|
|
|
|
|
+ if (host === 'trad.xiaoluwebsite.xyz') return 'trad';
|
|
|
|
|
+ if (host === 'payc.xiaoluwebsite.xyz') return 'payc';
|
|
|
|
|
+ if (host === 'order.xiaoluwebsite.xyz') return 'order';
|
|
|
|
|
+ if (host === 'plan.xiaoluwebsite.xyz') return 'plan';
|
|
|
|
|
+ if (host === 'plan_info.xiaoluwebsite.xyz') return 'plan_info';
|
|
|
|
|
+ if (host === 'i.xiaoluwebsite.xyz') return 'i';
|
|
|
|
|
+ if (host === 'easybuv.xiaoluwebsite.xyz') return 'easybuv';
|
|
|
|
|
|
|
|
// 生产环境逻辑 (保持不变,或者合并到上面的判断中)
|
|
// 生产环境逻辑 (保持不变,或者合并到上面的判断中)
|
|
|
if (import.meta.env.PROD) {
|
|
if (import.meta.env.PROD) {
|
|
@@ -133,24 +133,24 @@ export function onPath(path: string) {
|
|
|
let url = '';
|
|
let url = '';
|
|
|
// 域名映射表 (保持不变)
|
|
// 域名映射表 (保持不变)
|
|
|
const domainMap: Record<string, string> = {
|
|
const domainMap: Record<string, string> = {
|
|
|
- www: 'www.yingpai365.com',
|
|
|
|
|
- b: 'b.yingpai365.com',
|
|
|
|
|
- mro: 'mro.yingpai365.com',
|
|
|
|
|
- fuli: 'fuli.yingpai365.com',
|
|
|
|
|
- reg: 'reg.yingpai365.com',
|
|
|
|
|
- breg: 'breg.yingpai365.com',
|
|
|
|
|
- greg: 'greg.yingpai365.com',
|
|
|
|
|
- passport: 'passport.yingpai365.com',
|
|
|
|
|
- search: 'search.yingpai365.com',
|
|
|
|
|
- item: 'item.yingpai365.com',
|
|
|
|
|
- cart: 'cart.yingpai365.com',
|
|
|
|
|
- trad: 'trad.yingpai365.com',
|
|
|
|
|
- payc: 'payc.yingpai365.com',
|
|
|
|
|
- order: 'order.yingpai365.com',
|
|
|
|
|
- plan: 'plan.yingpai365.com',
|
|
|
|
|
- plan_info: 'plan_info.yingpai365.com',
|
|
|
|
|
- i: 'i.yingpai365.com',
|
|
|
|
|
- easybuv: 'easybuv.yingpai365.com'
|
|
|
|
|
|
|
+ www: 'www.xiaoluwebsite.xyz',
|
|
|
|
|
+ b: 'b.xiaoluwebsite.xyz',
|
|
|
|
|
+ mro: 'mro.xiaoluwebsite.xyz',
|
|
|
|
|
+ fuli: 'fuli.xiaoluwebsite.xyz',
|
|
|
|
|
+ reg: 'reg.xiaoluwebsite.xyz',
|
|
|
|
|
+ breg: 'breg.xiaoluwebsite.xyz',
|
|
|
|
|
+ greg: 'greg.xiaoluwebsite.xyz',
|
|
|
|
|
+ passport: 'passport.xiaoluwebsite.xyz',
|
|
|
|
|
+ search: 'search.xiaoluwebsite.xyz',
|
|
|
|
|
+ item: 'item.xiaoluwebsite.xyz',
|
|
|
|
|
+ cart: 'cart.xiaoluwebsite.xyz',
|
|
|
|
|
+ trad: 'trad.xiaoluwebsite.xyz',
|
|
|
|
|
+ payc: 'payc.xiaoluwebsite.xyz',
|
|
|
|
|
+ order: 'order.xiaoluwebsite.xyz',
|
|
|
|
|
+ plan: 'plan.xiaoluwebsite.xyz',
|
|
|
|
|
+ plan_info: 'plan_info.xiaoluwebsite.xyz',
|
|
|
|
|
+ i: 'i.xiaoluwebsite.xyz',
|
|
|
|
|
+ easybuv: 'easybuv.xiaoluwebsite.xyz'
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const baseDomain = domainMap[targetSite];
|
|
const baseDomain = domainMap[targetSite];
|
|
@@ -159,9 +159,8 @@ export function onPath(path: string) {
|
|
|
url = `https://${baseDomain}${path}`;
|
|
url = `https://${baseDomain}${path}`;
|
|
|
} else {
|
|
} else {
|
|
|
const devPort = window.location.port || import.meta.env.VITE_APP_PORT;
|
|
const devPort = window.location.port || import.meta.env.VITE_APP_PORT;
|
|
|
- url = `http://${baseDomain}:${devPort}${path}`;
|
|
|
|
|
|
|
+ url = `https://${baseDomain}:${devPort}${path}`;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 【修改】根据是否同域名决定跳转方式
|
|
// 【修改】根据是否同域名决定跳转方式
|
|
|
if (isSameSite) {
|
|
if (isSameSite) {
|
|
|
// 同域名且传入了 router,使用 Vue Router 内部跳转
|
|
// 同域名且传入了 router,使用 Vue Router 内部跳转
|