优化代码

This commit is contained in:
java110 2022-09-20 08:06:01 +08:00
parent 562a0f7ca7
commit a23a7fd272

View File

@ -32,7 +32,14 @@
ad: [],
adHeight: {
height: this.height + "upx"
}
},
banner: [{
url: this.imgUrl+'/h5/images/serve/banner1.jpg'
},
{
url: this.imgUrl+'/h5/images/serve/banner2.jpg'
}
],
};
},
mounted() {
@ -51,6 +58,9 @@
loadAdverts(_objData)
.then(function(_aPhotos) {
_that.ad = _aPhotos;
if(!_aPhotos || _aPhotos.length <1){
_that.ad = _that.banner;
}
});
}
}