7.24更新

This commit is contained in:
hrx 2026-07-24 10:02:52 +08:00
parent 69b810121d
commit 965f21554d
4 changed files with 11 additions and 8 deletions

View File

@ -80,9 +80,9 @@ router.beforeEach(async (to, from, next) => {
// 获取当前域名 // 获取当前域名
const hostname = window.location.hostname || ''; const hostname = window.location.hostname || '';
// 特殊处理:在 ncmatch.cn 域名下访问 /homePage/index 时重定向 // 特殊处理:在 ncmatch.cn / zgcopc.opencomputing.cn域名下访问 /homePage/index 时重定向
if (hostname.includes('ncmatch.cn'||'zgcopc.opencomputing.cn') && to.path === '/homePage/index') { if ((hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn')) && to.path === '/homePage/index') {
console.log("在 ncmatch.cn 域名下访问 /homePage/index重定向到 /ncmatchHome/index"); console.log("在 ncmatch.cn / zgcopc.opencomputing.cn 域名下访问 /homePage/index重定向到 /ncmatchHome/index");
next('/ncmatchHome/index'); next('/ncmatchHome/index');
NProgress.done(); NProgress.done();
return; return;

View File

@ -262,9 +262,10 @@ export default {
logoInfoNew: state => state.product.logoInfoNew, // Logo logoInfoNew: state => state.product.logoInfoNew, // Logo
}), }),
// ncmatch.cn // NCMatch
isNcmatchDomain() { isNcmatchDomain() {
return window.location.hostname.includes('ncmatch.cn'); const hostname = window.location.hostname
return hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn');
}, },
activeRules() { activeRules() {
if (this.loginMode === 'mobile') { if (this.loginMode === 'mobile') {

View File

@ -565,7 +565,8 @@ export default {
return window.location.href; return window.location.href;
} }
const baseUrl = window.location.href.split('#')[0]; const baseUrl = window.location.href.split('#')[0];
const homePath = window.location.hostname.includes('ncmatch.cn') ? '/ncmatchHome/index' : '/homePage/index'; const hostname = window.location.hostname
const homePath = hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn') ? '/ncmatchHome/index' : '/homePage/index';
return `${baseUrl}#${homePath}`; return `${baseUrl}#${homePath}`;
}, },

View File

@ -14,18 +14,19 @@ export function getHomePath() {
// 如果是业主机构 // 如果是业主机构
if ((domain_url.includes('ncmatch') || if ((domain_url.includes('ncmatch') ||
domain_url.includes('zgcopc') ||
domain_url.includes('9527') || domain_url.includes('9527') ||
domain_url.includes('8889') || domain_url.includes('8889') ||
domain_url.includes('8891') || domain_url.includes('8891') ||
['xterm.kaiyuancloud.cn', 'www.kaiyuancloud.cn', 'dev.kaiyuancloud.cn', 'dev.opencomputing.cn', 'test.kaiyuancloud.cn', 'localhost'].includes(domain_url)) && ['xterm.kaiyuancloud.cn', 'www.kaiyuancloud.cn', 'dev.kaiyuancloud.cn', 'dev.opencomputing.cn', 'test.kaiyuancloud.cn', 'localhost'].includes(domain_url)) &&
!url_link.includes('/domain/')) { !url_link.includes('/domain/')) {
if (domain_url.includes('ncmatch') || domain_url.includes('9527')) { if (domain_url.includes('ncmatch') || domain_url.includes('zgcopc') || domain_url.includes('9527')) {
homePath = '/ncmatchHome/index' homePath = '/ncmatchHome/index'
} else if (domain_url.includes('kaiyuancloud') || domain_url.includes('opencomputing') || domain_url.includes('localhost')) { } else if (domain_url.includes('kaiyuancloud') || domain_url.includes('opencomputing') || domain_url.includes('localhost')) {
homePath = '/homePage/index' homePath = '/homePage/index'
} }
} else if (hostname.includes('ncmatch.cn')) { } else if (hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn')) {
homePath = '/ncmatchHome/index' homePath = '/ncmatchHome/index'
} else { } else {
homePath = '/homePage/index' homePath = '/homePage/index'