微信小程序遇到修改数据后页面不渲染,遍历取到的数据都是首次点击的数据
<text wx:for="{{jadeClassList}}" wx:key="id" class="jade_class_name" data-jadeclassname="{{item.jadeClassName}}" bindtap="clickJadeClass">{{item.jadeClassName}}</text>
clickJadeClass(e) {
let that = this
let classname = e.currentTarget.dataset.jadeclassname
let jadelist = that.data.jadeList
let classtypelist = []
for (let i = 0; i < jadelist.length; i++) {
let jadelistname = jadelist[i].quality
console.log('jadelistname', jadelistname)
if (classname == '全部') {
wx.getStorage({
key: "jadeclasslist",
success(res) {
that.setData({
jadeList: res.data
})
}
})
} else if (classname == jadelistname) {
classtypelist.push(jadelist[i])
that.setData({
jadeList: classtypelist
})
}
}
},
问题说明:每次点击取到的let jadelistname = jadelist[i].quality数据都是首次点击的数据
需求:请问是什么地方的问题?