提交 761e02fe authored 作者: 王天霸's avatar 王天霸

1

上级 73730d7d
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
...@@ -212,19 +212,13 @@ ...@@ -212,19 +212,13 @@
xhttp.onreadystatechange = function() { xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) { if (xhttp.readyState == 4 && xhttp.status == 200) {
var channel_id = JSON.parse(xhttp.response).data.channel_id var channel_id = JSON.parse(xhttp.response).data.channel_id
if (channel_id == 0) {
var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-inon';
link.rel = 'icon';
link.href = '<%= BASE_URL %>icon.ico'
document.getElementsByTagName('head')[0].appendChild(link);
} else {
var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-inon'; link.type = 'image/x-inon';
link.rel = 'icon'; link.rel = 'icon';
link.href = '<%= BASE_URL %>favicon.ico' link.href = '<%= BASE_URL %>favicon.ico'
document.getElementsByTagName('head')[0].appendChild(link); document.getElementsByTagName('head')[0].appendChild(link);
}
} }
}; };
xhttp.open("GET", '//sysapi.jxhh.com/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 正式环境 xhttp.open("GET", '//sysapi.jxhh.com/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 正式环境
......
...@@ -609,11 +609,11 @@ ...@@ -609,11 +609,11 @@
created() { created() {
let isPc = this.IsPc() let isPc = this.IsPc()
/** 动态获取 sso配置域名 */ /** 动态获取 sso配置域名 */
this.getssourl();
// console.log(222,navigator.userAgent); // console.log(222,navigator.userAgent);
}, },
mounted() { mounted() {
this.getIndexInfo() this.getDomain()
window.addEventListener('scroll', this.handleScroll, true); window.addEventListener('scroll', this.handleScroll, true);
}, },
destroyed() { destroyed() {
...@@ -622,8 +622,12 @@ ...@@ -622,8 +622,12 @@
methods: { methods: {
/** 动态获取 sso 配置域名 */ /** 动态获取 sso 配置域名 */
getssourl() { getssourl(val) {
var ssa = window.location.host if(window.location.hostname=='localhost'){
var ssa = val
}else{
var ssa = window.location.host
}
let data = {domain: ssa} let data = {domain: ssa}
this.$store.dispatch('getssourl', data) this.$store.dispatch('getssourl', data)
.then((res) => { .then((res) => {
...@@ -642,10 +646,10 @@ ...@@ -642,10 +646,10 @@
}) })
}, },
// 获取渠道id // 获取渠道id
getIndexInfo() { getIndexInfo(val) {
let op = 'open' let op = 'open'
if(window.location.hostname=='localhost'){ if(window.location.hostname=='localhost'){
var ssa = 'www.stbz.net' var ssa = val
}else{ }else{
var ssa = window.location.host var ssa = window.location.host
} }
...@@ -661,7 +665,7 @@ ...@@ -661,7 +665,7 @@
this.keyWords = res.data.keywords; this.keyWords = res.data.keywords;
this.keyDescriptions = res.data.describe; this.keyDescriptions = res.data.describe;
this.getWebSite() this.getWebSite()
this.getDomain()
this.getAllcloud() this.getAllcloud()
} }
}) })
...@@ -690,6 +694,8 @@ ...@@ -690,6 +694,8 @@
this.navigationObj.open = res.data.Open.domain; this.navigationObj.open = res.data.Open.domain;
this.navigationObj.shop = res.data.Cloud.domain; this.navigationObj.shop = res.data.Cloud.domain;
this.navigationObj.aboutUs = res.data.Official.domain; this.navigationObj.aboutUs = res.data.Official.domain;
this.getIndexInfo(res.data.Cloud.domain)
this.getssourl(res.data.Cloud.domain);
} }
}) })
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论