jiangping
2024-08-02 3b7f44899cb2de793ced2bb4f5d64a1cda122738
wechat_jiaxuan/pages/consult/detail.js
@@ -7,7 +7,9 @@
  data: {
    bottomLift: 0,
    info: {},
    detail: {},
    origin: '',
    showShare: false
  },
@@ -19,11 +21,29 @@
    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() {
@@ -65,13 +85,6 @@
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})