Component({ properties: { list:{ type: Array, observer:function(newVal){ // console.log(newVal) this.setData({list:newVal}) } }, updateLoading:{ type: Boolean, observer:function(newVal){ this.setData({updateLoading:newVal}) } }, isAllLoaded:{ type: Boolean, observer:function(newVal){ this.setData({isAllLoaded:newVal}) } }, goodsTypeId:{ type: String, observer:function(newVal){ this.setData({goodsTypeId:newVal}) } } }, data: { list:[], updateLoading:false, isAllLoaded:false, goodsTypeId:-1, }, lifetimes: { ready() { }, }, methods: { // 跳转至详情页 goDetails(e){ console.log(e) let aid = e.currentTarget.dataset.id,title = e.currentTarget.dataset.title,relAid=e.currentTarget.dataset.relaid; wx.navigateTo({ url: '/pages/product/goods/detail?aid='+ (relAid?relAid:aid) }) } } })