| | |
| | | }, |
| | | |
| | | onShow(){ |
| | | console.log('onShow') |
| | | |
| | | refreshEnjoy(this) |
| | | this.refreshDatacount() |
| | | let discoverKey = wx.getStorageSync('discoverKey') || '' |
| | | if(discoverKey){ |
| | | this.setData({ catalogCode: discoverKey }) |
| | | setTimeout(() => { |
| | | wx.setStorageSync('discoverKey', '') |
| | | }, 500) |
| | | } |
| | | } |
| | | }, |
| | | refreshDatacount(){ |
| | | var child =null; |
| | | if(this.data.catalogCode == 'product_intro'){ |
| | | child = this.selectComponent(".disProduct") |
| | | }else if(this.data.catalogCode == 'whole_case'){ |
| | | child = this.selectComponent(".disCase") |
| | | }else if(this.data.catalogCode == 'real_case'){ |
| | | child = this.selectComponent(".disRealpic") |
| | | } |
| | | // 调用子组件中定义的方法 |
| | | if(child){ |
| | | child.refreshCount(); |
| | | } |
| | | }, |
| | | tabsClick(e) { |
| | | const catalogCode = e.currentTarget.dataset.code |