You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
大佬,微信小程序购物车界面不显示任何内容了为什么呀,Console报错
Uncaught (in promise) TypeError: Cannot read property 'images' of null
at index.js:44
at Array.forEach ()
at index.js:44
at
我点开index.js,Sources标注pages/cart/index.js下面最长的那一句后面括号里错误:
getCarts() {
App.HttpService.getCartByUser()
.then(res => {
const data = res.data
console.log(data)
if (data.meta.code == 0) {
data.data.forEach(n => n.goods.thumb_url = App.renderImage(n.goods.images[0] && n.goods.images[0].path))
this.setData({
'carts.items': data.data,
'prompt.hidden': data.data.length,
})
}
})
},
是因为我把后端的数据都换掉了吗[/害怕]
The text was updated successfully, but these errors were encountered: