Merge branch 'main' of https://git.opencomputing.cn/yumoqing/kboss
This commit is contained in:
commit
64c6e50880
@ -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;
|
||||||
|
|||||||
@ -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') {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="product-service-page" :class="{ 'single-product-page': isSinglePageMode }">
|
<div class="product-service-page" :class="{ 'single-product-page': isSinglePageMode }">
|
||||||
x
|
|
||||||
<!-- 产品分类导航 -->
|
<!-- 产品分类导航 -->
|
||||||
<div v-if="!isSinglePageMode" class="category-nav">
|
<div v-if="!isSinglePageMode" class="category-nav">
|
||||||
<div v-for="category in panelData"
|
<div v-for="category in panelData"
|
||||||
@ -118,11 +118,12 @@
|
|||||||
<div class="token-card-top">
|
<div class="token-card-top">
|
||||||
<span class="token-provider-avatar">
|
<span class="token-provider-avatar">
|
||||||
<img
|
<img
|
||||||
:src="product.model_logo"
|
v-if="getModelLogoUrl(product.model_logo) && !product.logoLoadFailed"
|
||||||
alt="模型logo"
|
:src="getModelLogoUrl(product.model_logo)"
|
||||||
|
:alt="product.display_name || product.model_name || '模型logo'"
|
||||||
@error="handleModelLogoError(product)"
|
@error="handleModelLogoError(product)"
|
||||||
>
|
>
|
||||||
|
<template v-else>{{ getProviderInitial(product.provider || product.display_name) }}</template>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="token-title-group">
|
<div class="token-title-group">
|
||||||
@ -565,7 +566,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}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1593,16 +1595,16 @@ export default {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
// background: #7c3aed;
|
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
|
||||||
// border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// box-shadow: 0 6px 16px rgba(124, 58, 237, 0.18);
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 34px;
|
width: 100%;
|
||||||
height: 34px;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: contain;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user