| | |
| | | origin: '', |
| | | isFold: false, |
| | | info: {}, |
| | | isCollection: false, |
| | | member: {}, |
| | | showShare: false, |
| | | options: { |
| | |
| | | }, |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { |
| | | info, member |
| | | let { |
| | | info, member, isCollection |
| | | } = this.data |
| | | if (!member.phone) { |
| | | return wx.navigateTo({ |
| | |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.isCollection = !info.isCollection |
| | | isCollection = !isCollection |
| | | this.setData({ |
| | | info |
| | | isCollection |
| | | }) |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? '收藏成功' : '取消收藏', |
| | |
| | | salesId: userId || null |
| | | }).then(res => { |
| | | this.setData({ |
| | | info: res.data |
| | | info: res.data, |
| | | isCollection: res.data.isCollection |
| | | }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |