wxml中:
<!--轮播图-->
<swiper class="ad-content" indicator-dots="true" autoplay="true" interval="3000" duration="1200">
<block wx:for-items="{{lunboData}}" wx:key="index">
<swiper-item class="ad">
<image src="{{item}}" class="ad-image"></image>
</swiper-item>
</block>
</swiper>
js中:
onLoad(){
const that = this
if(this.data.lunboData==null){
console.log("进来获取轮播图")
db.collection("SystemValue").get().then(res=>{
var lunboData = res.data[0].lunboData
that.setData({
lunboData:lunboData
})
console.log("获取轮播图成功")
console.log(lunboData)
})
}
},
在手机端有获取到照片地址:
这是属于页面加载问题吗,可以怎么解决呢