image组件无法显示图片,我设置了一些样式,然后图片地址是后端获取的,只有点开了图片之后才会正常显示是为什么
<image class="{{index==xindex?'imageBanner':'imageBanner_small'}}" data-index="{{index}}" data-item="item" bindtap="clickImg" src="/uploads/cj/article/2021/04/01/f2b9489db529658d9122e50985cd3c3c.jpg" wx:if="{{item.length>0}}"></image>
clickImg(res){
console.log(res)
var num=res.currentTarget.dataset.index
wx.previewImage({
urls:[this.data.banner[num]]
})
}
点开了功能是显示原图
The image component can't display the image. I set some styles, and then the image address is obtained from the back end. Only when the image is opened can it be displayed normally. Why < image class = {{index = = xindex?'imagebanner ':'imagebanner'_ small'}}" data-index="{{index}}" data-item="item" bindtap="clickImg" src="/uploads/cj/article/2021/04/01/f2b9489db529658d9122e50985cd3c3c.jpg" wx:if="{{ item.length >0}}"> clickImg(res){ console.log (res) var num= res.currentTarget.dataset .index wx.previewImage ({ urls:[ this.data.banner The function is to display the original image
你这个item是什么