| | |
| | | import { |
| | | getContentShareImg |
| | | getContentShareImg, |
| | | actionDo |
| | | } from '../../api/index' |
| | | Component({ |
| | | /** |
| | |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleShare() { |
| | | let map = [ |
| | | '/pages/detailDis/product', |
| | | '/pages/detailDis/case', |
| | | '/pages/detailDis/realpic', |
| | | '/pages/consult/detail', |
| | | '/pages/detailDis/product',//产品详情 |
| | | '/pages/detailDis/case',//案例详情 |
| | | '/pages/detailDis/realpic',//实景详情 |
| | | '/pages/consult/detail',//资讯详情 |
| | | ] |
| | | const { info, path} = this.data |
| | | actionDo({ |
| | | actionType: 'share', |
| | | id: info.id |
| | | }) |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wx208dd1edc0be24ee', |
| | | path: `${map[path]}?origin=b&id=${info.id}`, |
| | | appId: 'wxcd2b89fd2ff065f8', |
| | | path: `${map[path]}?origin=b&id=${info.id}&userId=${wx.getStorageSync('member').id}`, |
| | | envVersion: 'trial' |
| | | }) |
| | | }, |
| | |
| | | flag: !info.isEnjoy |
| | | }) |
| | | }, |
| | | handleCollec() { |
| | | handleCollec() { |
| | | const { |
| | | info |
| | | } = this.data |
| | |
| | | type: 'collec', |
| | | flag: !info.isCollection |
| | | }) |
| | | |
| | | }, |
| | | handleDown() { |
| | | const { |
| | | info, |
| | | path |
| | | } = this.data |
| | | let that = this |
| | | |
| | | getContentShareImg({ |
| | | articleId: `${info.id}_${path}`, |
| | | type: '0', |
| | |
| | | isShowPoster: true, |
| | | showShare: false, |
| | | posterUrl: res.data |
| | | }) |
| | | |
| | | }) |
| | | }) |
| | | }, |
| | | saveCard() { |
| | |
| | | wx.setStorageSync('downloadConfig', { |
| | | path: this.data.path,id: this.data.info.id |
| | | }) |
| | | actionDo({ |
| | | actionType: 'download', |
| | | id: this.data.info.id |
| | | }) |
| | | wx.navigateTo({ |
| | | url: '/pages/download/index', |
| | | }, 1000) |