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