代码更新[A
This commit is contained in:
parent
228e630d46
commit
97c49896c5
@ -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);
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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 {
|
||||
homePath = '/homePage/index'
|
||||
}
|
||||
// this.$message.success("homePath是"+homePath)
|
||||
console.log("homePath是",homePath)
|
||||
console.log("getHomePath - hostname:", hostname, "homePath:", homePath)
|
||||
return homePath
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user