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

Merge branch 'scm_optimize' of http://120.27.146.32:8888/wangfulong/shop-new into scm_optimize

...@@ -205,38 +205,38 @@ ...@@ -205,38 +205,38 @@
</div> </div>
</body> </body>
<script> <script>
window.onload = function() { // window.onload = function() {
var op = 'open' // var op = 'open'
var ssa = window.location.host // var ssa = window.location.host
var xhttp = new XMLHttpRequest(); // var xhttp = new XMLHttpRequest();
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) { // if (channel_id == 0) {
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 %>icon.ico' // link.href = '<%= BASE_URL %>icon.ico'
document.getElementsByTagName('head')[0].appendChild(link); // document.getElementsByTagName('head')[0].appendChild(link);
} else { // } 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); // 正式环境
// xhttp.open("GET", '//newsys.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("GET", '//192.168.26.179:6601/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true); // 测试环境
xhttp.open("post", '//'+ ssa +'/api/v1/channelSite/domain/info', true); // xhttp.open("post", '//sysapi.jxhh.com/api/v1/channelSite/domain/info', true);
let data = { // let data = {
domain: ssa, // domain: ssa,
type: 2, // type: 1,
site_type: 4 // site_type: 4
} // }
xhttp.send(JSON.stringify(data)); // xhttp.send(JSON.stringify(data));
} // }
</script> </script>
</html> </html>
...@@ -23,7 +23,7 @@ export function getdomain(params) { ...@@ -23,7 +23,7 @@ export function getdomain(params) {
// 获取官网设置接口 // 获取官网设置接口
export function webSite(data) { export function webSite(data) {
return request({ return request({
url: '//sysapi.jxhh.com/api/v1/channelSite/info', url: '/channelSite/domain/info',
// url: '//192.168.26.179:6601/api/v1/oem/common/counsel', // url: '//192.168.26.179:6601/api/v1/oem/common/counsel',
// url: '//newsys.jxhh.com/api/v1/oem/common/counsel', // url: '//newsys.jxhh.com/api/v1/oem/common/counsel',
method: 'post', method: 'post',
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
watch: { watch: {
channelInfo() { channelInfo() {
if (this.channelInfo) { if (this.channelInfo) {
this.channel_id = this.channelInfo.channel.id this.channel_id = this.channelInfo.channel_site[0].channel_id
} }
}, },
}, },
......
...@@ -126,6 +126,35 @@ const user = { ...@@ -126,6 +126,35 @@ const user = {
commit('SET_SELLERID', user.SellerId) commit('SET_SELLERID', user.SellerId)
commit('SET_APPLYSTATE', user.state) // 记录 商户入驻后的审核状态 commit('SET_APPLYSTATE', user.state) // 记录 商户入驻后的审核状态
commit('SET_AVATAR', avatar) 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) resolve(res)
}).catch(error => { }).catch(error => {
reject(error) reject(error)
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<swiper :options="swiperOption" v-if="bannerList && bannerList.length > 0"> <swiper :options="swiperOption" v-if="bannerList && bannerList.length > 0">
<swiper-slide v-for="(item,index) in bannerList" :key="index"> <swiper-slide v-for="(item,index) in bannerList" :key="index">
<a :href="aLinkRes(item.redirect_url) " :target="returnBlank(item.redirect_url)"> <a :href="aLinkRes(item.redirect_url) " :target="returnBlank(item.redirect_url)">
<img style="width: 100%;height: 562px;" :src="item.image_url" alt=""> <img style="width: 100%;height: 562px;" :src="item.img_url" alt="">
</a> </a>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<swiper class="mb-banner-con mobile-content" :options="swiperOption" v-if="bannerList && bannerList.length > 0"> <swiper class="mb-banner-con mobile-content" :options="swiperOption" v-if="bannerList && bannerList.length > 0">
<swiper-slide v-for="(item,index) in bannerList" :key="index"> <swiper-slide v-for="(item,index) in bannerList" :key="index">
<a :href="aLinkRes(item.redirect_url) " :target="returnBlank(item.redirect_url)"> <a :href="aLinkRes(item.redirect_url) " :target="returnBlank(item.redirect_url)">
<img :src="item.image_url" alt=""> <img :src="item.img_url" alt="">
</a> </a>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
...@@ -634,7 +634,7 @@ ...@@ -634,7 +634,7 @@
if (res.code == 1) { if (res.code == 1) {
this.ssourl = res.data.channel_site[0].domain this.ssourl = res.data.channel_site[0].domain
this.channel_id = res.data.channel.id this.channel_id = res.data.channel_site[0].channel_id
this.keyTitle = res.data.channel_site[0].title; this.keyTitle = res.data.channel_site[0].title;
this.keyWords = res.data.channel_site[0].keywords; this.keyWords = res.data.channel_site[0].keywords;
this.keyDescriptions = res.data.channel_site[0].describe; this.keyDescriptions = res.data.channel_site[0].describe;
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,7 @@
} }
indexInfo(data).then(res => { indexInfo(data).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.channel_id = res.data.channel.id this.channel_id = res.data.channel_site[0].channel_id
this.keyTitle = res.data.channel_site[0].title; this.keyTitle = res.data.channel_site[0].title;
this.keyWords = res.data.channel_site[0].keywords; this.keyWords = res.data.channel_site[0].keywords;
this.keyDescriptions = res.data.channel_site[0].describe; this.keyDescriptions = res.data.channel_site[0].describe;
...@@ -724,7 +724,7 @@ ...@@ -724,7 +724,7 @@
if (res.data.cloud_banner_lst && res.data.cloud_banner_lst.banners_json && res.data.cloud_banner_lst.banners_json.length > 0) { if (res.data.cloud_banner_lst && res.data.cloud_banner_lst.banners_json && res.data.cloud_banner_lst.banners_json.length > 0) {
let bannerArr = [] let bannerArr = []
res.data.cloud_banner_lst.banners_json.forEach(element => { res.data.cloud_banner_lst.banners_json.forEach(element => {
if (element.image_url) { if (element.img_url) {
bannerArr.push(element); bannerArr.push(element);
} }
}); });
......
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
indexInfo(data).then(res => { indexInfo(data).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.channel_id = res.data.channel.id this.channel_id = res.data.channel.id
this.getWebSite() this.settitle.topLogo = res.data.channel_site[0].logo
// this.getWebSite()
} }
}) })
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论