| | |
| | | this.getList() |
| | | }, |
| | | itemClick(e) { |
| | | const { id } = e.target.dataset |
| | | console.log(e.target.dataset); |
| | | wx.navigateTo({ |
| | | url: '/pages/consult/detail', |
| | | }) |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | if(item.contentType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.content, type: 'video' }] |
| | | }) |
| | | } |
| | | if(item.contentType == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.content, |
| | | }) |
| | | } |
| | | if(item.contentType == 'page'){ |
| | | getApp().globalData.catalogCode=item.content |
| | | wx.switchTab({ |
| | | url: '/pages/discover/discover' |
| | | }) |
| | | } |
| | | }, |
| | | cateClick(e) { |
| | | const { code } = e.target.dataset |
| | |
| | | const { code, tagCodes, pageSize, pageNum } = this.data |
| | | pageZSZXContentList({ |
| | | catalogCode: code, |
| | | tagCodes, |
| | | tagCodes: tagCodes ? [tagCodes] : [], |
| | | pageSize, |
| | | pageNum |
| | | }).then(res => { |