Compare commits

...

2 Commits

Author SHA1 Message Date
5fb098b8a4 Merge pull request '代码更新' (#90) from main into prod
Reviewed-on: #90
2026-03-30 11:38:15 +08:00
hrx
97c49896c5 代码更新 2026-03-30 11:37:49 +08:00
3 changed files with 11 additions and 5 deletions

View File

@ -19,7 +19,6 @@ import ShowGpu from "@/views/product/productHome/capitalOnline/productItem/GpuPr
import ShowEip from "@/views/product/productHome/capitalOnline/Net/Eip/showEip/index.vue";
import CreateEip from "@/views/product/productHome/capitalOnline/Net/Eip/createEip/index.vue";
import { getHomePath } from '@/views/setting/tools'
import { h } from "vue";
Vue.use(Router);

View File

@ -670,7 +670,11 @@ export default Vue.extend({
// -
goHome() {
console.log('当前域名:', window.location.href);
console.log('=== goHome 方法开始 ===');
console.log('当前完整URL:', window.location.href);
console.log('当前hostname:', window.location.hostname);
console.log('isNcmatchDomain判断结果:', this.isNcmatchDomain);
console.log('准备跳转的路径:', this.isNcmatchDomain ? '/ncmatchHome/index' : '/homePage/index');
if (this.isNcmatchDomain) {
this.$router.push('/ncmatchHome/index');

View File

@ -9,6 +9,9 @@ export function getHomePath() {
domain_url = url_link.split('?domain_name=')[1];
}
// 使用 hostname 进行更精确的判断
const hostname = window.location.hostname || '';
// 如果是业主机构
if ((domain_url.includes('ncmatch') ||
domain_url.includes('9527') ||
@ -22,12 +25,12 @@ export function getHomePath() {
} else if (domain_url.includes('kaiyuancloud') || domain_url.includes('opencomputing') || domain_url.includes('localhost')) {
homePath = '/homePage/index'
}
}else if(url_link.includes('ncmatch')){
} else if (hostname.includes('ncmatch.cn')) {
homePath = '/ncmatchHome/index'
}else{
} else {
homePath = '/homePage/index'
}
// this.$message.success("homePath是"+homePath)
console.log("homePath是",homePath)
console.log("getHomePath - hostname:", hostname, "homePath:", homePath)
return homePath
}