ll
liukangdong
2024-08-15 ebc6e7ee67f13e7aa311e737dfcb4c5caed112ee
wechat_jiaxuan/pages/detailDis/realpic.js
@@ -1,6 +1,7 @@
import {
  getRealcaseInfo,
  actionDo
  actionDo,
  getMemberInfo
} from '../../api/index'
import {
  eventBus
@@ -21,6 +22,9 @@
      actionType: 'view',
      id: options.id
    })
  },
  onShow(){
    this.setData({ member: wx.getStorageSync('member') })
  },
  onUnload() {
    console.log('详情进行了销毁');
@@ -50,7 +54,7 @@
      info
    } = this.data
    const member = wx.getStorageSync('member')
    if (member.authStatus == '0') {
    if (!member.phone) {
      return wx.navigateTo({
        url: '/pages/auth/auth',
      })
@@ -85,6 +89,7 @@
          this.setData({
            member: res.data
          })
          wx.setStorageSync('member', res.data)
        })
      }
    })
@@ -118,6 +123,13 @@
    })
  },
  handleDesign() {
    const { member } = this.data
    if (!member.phone) {
      wx.setStorageSync('tempPath', '/pages/design/design')
      return wx.navigateTo({
        url: '/pages/auth/auth',
      })
    }
    wx.navigateTo({
      url: '/pages/design/design',
    })
@@ -137,13 +149,6 @@
    //   this.setData({showShare: false})
    // })
  },
  // onShareAppMessage: function () {
  //   // let { productDetail, userInfo } = this.data
  //   return {
  //     title: productDetail.title,
  //     path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
  //   }
  // },
  onClose() {
    this.setData({
      showShare: false
@@ -202,8 +207,14 @@
      info
    } = this.data
    console.log('点击了分享')
    return {
      path: '/pages/detailDis/realpic?id=' + info.id + '&userId=' + info.users.id
    if(info.users && info.users.id){
      return {
        path: '/pages/detailDis/realpic?id=' + info.id + '&userId=' + info.users.id
      }
    }else{
      return {
        path: '/pages/detailDis/realpic?id=' + info.id
      }
    }
  },
})