tianyi 3 weeks ago
parent
commit
cfe29e2656
  1. 11
      pages/index/index.vue

11
pages/index/index.vue

@ -1060,16 +1060,12 @@
that.mallAds = res.result.mallAds that.mallAds = res.result.mallAds
for(let i=0;i<that.mallAds.length;i++){ for(let i=0;i<that.mallAds.length;i++){
if(that.mallAds[i].position == 'home_top'){ if(that.mallAds[i].position == 'home_top'){
// //
if (that.mallAds[i].adImage.indexOf(',') !== -1) { if (that.mallAds[i].adImage.indexOf(',') !== -1) {
// {pic: url} // {pic: url}
that.adList = that.mallAds[i].adImage that.adList = that.mallAds[i].adImage.split(',').filter(item => item.trim() !== '').map(url => ({
.split(',') pic: url.trim()
.filter(item => item.trim() !== '') // }));
.map(url => ({
pic: url.trim()
}));
} else { } else {
// //
that.adList = [{ that.adList = [{
@ -1107,6 +1103,7 @@
}).catch((res) => {}); }).catch((res) => {});
}, },
goAdPage(item) { goAdPage(item) {
console.log('hahahahah',item)
uni.navigateTo({ uni.navigateTo({
url: item.linkUrl + item.linkParams url: item.linkUrl + item.linkParams
}) })

Loading…
Cancel
Save