From 965f21554d57285c679b8f888bc4b253b37391de Mon Sep 17 00:00:00 2001 From: hrx <18603305412@163.com> Date: Fri, 24 Jul 2026 10:02:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?7.24=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f/web-kboss/src/permission.js | 6 +++--- f/web-kboss/src/views/login/indexNew.vue | 5 +++-- f/web-kboss/src/views/product/allProduct/index.vue | 3 ++- f/web-kboss/src/views/setting/tools.js | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/f/web-kboss/src/permission.js b/f/web-kboss/src/permission.js index 4b670e3..f11b4ca 100644 --- a/f/web-kboss/src/permission.js +++ b/f/web-kboss/src/permission.js @@ -80,9 +80,9 @@ router.beforeEach(async (to, from, next) => { // 获取当前域名 const hostname = window.location.hostname || ''; - // 特殊处理:在 ncmatch.cn 域名下访问 /homePage/index 时重定向 - if (hostname.includes('ncmatch.cn'||'zgcopc.opencomputing.cn') && to.path === '/homePage/index') { - console.log("在 ncmatch.cn 域名下访问 /homePage/index,重定向到 /ncmatchHome/index"); + // 特殊处理:在 ncmatch.cn / zgcopc.opencomputing.cn域名下访问 /homePage/index 时重定向 + if ((hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn')) && to.path === '/homePage/index') { + console.log("在 ncmatch.cn / zgcopc.opencomputing.cn 域名下访问 /homePage/index,重定向到 /ncmatchHome/index"); next('/ncmatchHome/index'); NProgress.done(); return; diff --git a/f/web-kboss/src/views/login/indexNew.vue b/f/web-kboss/src/views/login/indexNew.vue index f75f700..6066fb8 100644 --- a/f/web-kboss/src/views/login/indexNew.vue +++ b/f/web-kboss/src/views/login/indexNew.vue @@ -262,9 +262,10 @@ export default { logoInfoNew: state => state.product.logoInfoNew, // Logo信息 }), - // 检查当前域名是否为ncmatch.cn + // 检查当前域名是否为 NCMatch 系列官网。 isNcmatchDomain() { - return window.location.hostname.includes('ncmatch.cn'); + const hostname = window.location.hostname + return hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn'); }, activeRules() { if (this.loginMode === 'mobile') { diff --git a/f/web-kboss/src/views/product/allProduct/index.vue b/f/web-kboss/src/views/product/allProduct/index.vue index b56befc..08a8961 100644 --- a/f/web-kboss/src/views/product/allProduct/index.vue +++ b/f/web-kboss/src/views/product/allProduct/index.vue @@ -565,7 +565,8 @@ export default { return window.location.href; } 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}`; }, diff --git a/f/web-kboss/src/views/setting/tools.js b/f/web-kboss/src/views/setting/tools.js index 470b497..38d5a29 100644 --- a/f/web-kboss/src/views/setting/tools.js +++ b/f/web-kboss/src/views/setting/tools.js @@ -14,18 +14,19 @@ export function getHomePath() { // 如果是业主机构 if ((domain_url.includes('ncmatch') || + domain_url.includes('zgcopc') || domain_url.includes('9527') || domain_url.includes('8889') || domain_url.includes('8891') || ['xterm.kaiyuancloud.cn', 'www.kaiyuancloud.cn', 'dev.kaiyuancloud.cn', 'dev.opencomputing.cn', 'test.kaiyuancloud.cn', 'localhost'].includes(domain_url)) && !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' } else if (domain_url.includes('kaiyuancloud') || domain_url.includes('opencomputing') || domain_url.includes('localhost')) { homePath = '/homePage/index' } - } else if (hostname.includes('ncmatch.cn')) { + } else if (hostname.includes('ncmatch.cn') || hostname.includes('zgcopc.opencomputing.cn')) { homePath = '/ncmatchHome/index' } else { homePath = '/homePage/index' From c9df800c404a0e3a7b0161eddd398e7a866bc336 Mon Sep 17 00:00:00 2001 From: hrx <18603305412@163.com> Date: Fri, 24 Jul 2026 15:51:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?7.24=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/product/allProduct/index.vue | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/f/web-kboss/src/views/product/allProduct/index.vue b/f/web-kboss/src/views/product/allProduct/index.vue index 08a8961..aeaa6f3 100644 --- a/f/web-kboss/src/views/product/allProduct/index.vue +++ b/f/web-kboss/src/views/product/allProduct/index.vue @@ -1,6 +1,6 @@