| | |
| | | this.setData({ info }) |
| | | enjoyList.push({ |
| | | ...info, |
| | | joinType: 'product', |
| | | joinType: '0', |
| | | timestamp: new Date().getTime() |
| | | }) |
| | | }else{ |
| | |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { |
| | | info |
| | | } = this.data |
| | | actionDo({ |
| | | actionType, |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.isCollection = !info.isCollection |
| | | this.setData({ |
| | | info |
| | | }) |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? '收藏成功' : '取消收藏', |
| | | }) |
| | | }) |
| | | }, |
| | | onShareAppMessage() { |
| | | console.log('用户点击了分享'); |
| | |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |