| | |
| | | data: { |
| | | bottomLift: 0, |
| | | info: {}, |
| | | detail: {}, |
| | | |
| | | origin: '', |
| | | showShare: false |
| | | }, |
| | | |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | if(options.origin && options.origin == 'b'){ |
| | | this.setData({ origin: 'b' }) |
| | | } |
| | | this.getDetail(options.id, options.userId || '') |
| | | }, |
| | | getDetail(id) { |
| | | getProductNewsInfo({ id }).then(res => { |
| | | this.setData({ detail: res.data }) |
| | | handleDesign() { |
| | | wx.navigateTo({ |
| | | url: '/pages/design/design', |
| | | }) |
| | | }, |
| | | onShareAppMessage() { |
| | | let { info } = this.data |
| | | console.log('点击了分享') |
| | | return { |
| | | path: '/pages/consult/detail?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | }, |
| | | getDetail(id, userId) { |
| | | getProductNewsInfo({ id, salesId: userId || null }).then(res => { |
| | | this.setData({ info: res.data }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | }, |
| | | openShare() { |
| | |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |