提交 ebd3cc2e authored 作者: 郑伟娜's avatar 郑伟娜

Merge branch 'scm_optimize' into test

......@@ -205,38 +205,38 @@
</div>
</body>
<script>
window.onload = function() {
var op = 'open'
var ssa = window.location.host
var xhttp = new XMLHttpRequest();
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); // 正式环境
// xhttp.open("GET", '//newsys.jxhh.com/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 内网开发
// xhttp.open("GET", '//192.168.26.179:6601/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 测试环境
xhttp.open("post", '//sysapi.jxhh.com/api/v1/channelSite/domain/info', true);
let data = {
domain: ssa,
type: 1,
site_type: 4
}
xhttp.send(JSON.stringify(data));
}
// window.onload = function() {
// var op = 'open'
// var ssa = window.location.host
// var xhttp = new XMLHttpRequest();
// 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); // 正式环境
// // xhttp.open("GET", '//newsys.jxhh.com/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 内网开发
// // xhttp.open("GET", '//192.168.26.179:6601/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 测试环境
// xhttp.open("post", '//sysapi.jxhh.com/api/v1/channelSite/domain/info', true);
// let data = {
// domain: ssa,
// type: 1,
// site_type: 4
// }
// xhttp.send(JSON.stringify(data));
// }
</script>
</html>
......@@ -129,6 +129,35 @@ const user = {
commit('SET_SELLERID', user.SellerId)
commit('SET_APPLYSTATE', user.state) // 记录 商户入驻后的审核状态
commit('SET_AVATAR', avatar)
let data = {
domain: window.location.host,
type: 2,
site_type: 4
}
backDetailsView(data).then(response => {
if (response.code == 1) {
let channel_id = 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);
}
document.title = response.data.channel_site[0].title
}
})
resolve(res)
}).catch(error => {
reject(error)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论