| | |
| | | id: options.id |
| | | }) |
| | | }, |
| | | onShow(){ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | }, |
| | | onUnload() { |
| | | console.log('详情进行了销毁'); |
| | | setTimeout(() => { |
| | |
| | | const { |
| | | info, member |
| | | } = this.data |
| | | if (member.authStatus == '0') { |
| | | if (!member.phone) { |
| | | return wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | getMemberInfo().then(res => { |
| | | this.setData({ member: res.data }) |
| | | }) |
| | | if(userId){ |
| | | getMemberInfo().then(res => { |
| | | this.setData({ member: res.data }) |
| | | wx.setStorageSync('member', res.data) |
| | | }) |
| | | }else{ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | } |
| | | }) |
| | | }, |
| | | playVideo() { |
| | |
| | | }) |
| | | }, |
| | | 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', |
| | | }) |
| | |
| | | onShareAppMessage: function () { |
| | | let { info } = this.data |
| | | console.log('点击了分享') |
| | | return { |
| | | path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id |
| | | if(info.users && info.users.id){ |
| | | return { |
| | | path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | }else{ |
| | | return { |
| | | path: '/pages/detailDis/product?id=' + info.id |
| | | } |
| | | } |
| | | }, |
| | | onClose() { |