<view>{{xiangx.neirong}}</view>
<view>
<image src='{{xiangx.picurl}}' style="width: 200px; height: 200px; background-color: #eeeeee;" mode="aspectFill">
</image>
</view>
第一个<view>标签显示正确,第二个始终显示同一张图片,但是查看标签绑定的图片地址是正确的
onLoad: function (options) {
let that = this;
var pt = options.pingt;
var pm = options.paim;
var xpt = 'x' + pt
console.log(pm)
console.log(xpt)
ddbb.collection(xpt).where({
paiming: pm
}).get({
success: function (res) {
that.setData({
xiangx: res.data[0],
})
console.log(res.data[0].picurl)
}
})
},