首页广告优化

master
Lee-1203 2022-06-10 16:53:44 +08:00
parent 657fb67294
commit 0bc50874b9
1 changed files with 11 additions and 5 deletions

View File

@ -141,6 +141,7 @@
consult_amount: 0, //
bannerSrc: "", //banner
adSrc: "", //广
adUrl: "", //广
expertData: [], //
video: null,
isPaused: true,
@ -229,6 +230,7 @@
.then(function(res) {
console.log(res,'首页广告')
that.adSrc = res.data.data[0].src;
that.adUrl = res.data.data[0].url;
});
},
@ -268,12 +270,16 @@
this.$router.push(path);
},
toNewPage(){
let url = 'https://zym.emingren.com';
if(this.ddEntrance == 'yes'){
// postMessage
dd.postMessage({name:'newsPage',url:url});
let url = this.adUrl;
if(this.adUrl == '' || this.adUrl == '#'){
return false;
}else{
window.open('https://zym.emingren.com');
if(this.ddEntrance == 'yes'){
// postMessage
dd.postMessage({name:'newsPage',url:url});
}else{
window.open(url);
}
}
}
},