commit
5fb098b8a4
@ -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 ShowEip from "@/views/product/productHome/capitalOnline/Net/Eip/showEip/index.vue";
|
||||||
import CreateEip from "@/views/product/productHome/capitalOnline/Net/Eip/createEip/index.vue";
|
import CreateEip from "@/views/product/productHome/capitalOnline/Net/Eip/createEip/index.vue";
|
||||||
import { getHomePath } from '@/views/setting/tools'
|
import { getHomePath } from '@/views/setting/tools'
|
||||||
import { h } from "vue";
|
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
|
|
||||||
|
|||||||
@ -670,7 +670,11 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// 首页跳转方法 - 根据域名判断跳转到不同的首页
|
// 首页跳转方法 - 根据域名判断跳转到不同的首页
|
||||||
goHome() {
|
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) {
|
if (this.isNcmatchDomain) {
|
||||||
this.$router.push('/ncmatchHome/index');
|
this.$router.push('/ncmatchHome/index');
|
||||||
|
|||||||
@ -9,6 +9,9 @@ export function getHomePath() {
|
|||||||
domain_url = url_link.split('?domain_name=')[1];
|
domain_url = url_link.split('?domain_name=')[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 使用 hostname 进行更精确的判断
|
||||||
|
const hostname = window.location.hostname || '';
|
||||||
|
|
||||||
// 如果是业主机构
|
// 如果是业主机构
|
||||||
if ((domain_url.includes('ncmatch') ||
|
if ((domain_url.includes('ncmatch') ||
|
||||||
domain_url.includes('9527') ||
|
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')) {
|
} else if (domain_url.includes('kaiyuancloud') || domain_url.includes('opencomputing') || domain_url.includes('localhost')) {
|
||||||
homePath = '/homePage/index'
|
homePath = '/homePage/index'
|
||||||
}
|
}
|
||||||
}else if(url_link.includes('ncmatch')){
|
} else if (hostname.includes('ncmatch.cn')) {
|
||||||
homePath = '/ncmatchHome/index'
|
homePath = '/ncmatchHome/index'
|
||||||
}else{
|
} else {
|
||||||
homePath = '/homePage/index'
|
homePath = '/homePage/index'
|
||||||
}
|
}
|
||||||
// this.$message.success("homePath是"+homePath)
|
// this.$message.success("homePath是"+homePath)
|
||||||
console.log("homePath是",homePath)
|
console.log("getHomePath - hostname:", hostname, "homePath:", homePath)
|
||||||
return homePath
|
return homePath
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user