34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
export function getHomePath() {
|
|
// let homePath= "/homePage/index"
|
|
let homePath= ""
|
|
|
|
// 业主机构信息
|
|
let url_link = window.location.href || '';
|
|
let domain_url = '';
|
|
if (url_link.includes('?domain_name=')) {
|
|
domain_url = url_link.split('?domain_name=')[1];
|
|
}
|
|
|
|
// 如果是业主机构
|
|
if ((domain_url.includes('ncmatch') ||
|
|
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')) {
|
|
homePath = '/homePage/index'
|
|
} else if (domain_url.includes('kaiyuancloud') || domain_url.includes('opencomputing') || domain_url.includes('localhost')) {
|
|
homePath = '/homePage/index'
|
|
}
|
|
}else if(url_link.includes('ncmatch')){
|
|
homePath = '/homePage/index'
|
|
}else{
|
|
homePath = '/homePage/index'
|
|
}
|
|
// this.$message.success("homePath是"+homePath)
|
|
console.log("homePath是",homePath)
|
|
return homePath
|
|
}
|