ll
liukangdong
2024-08-27 2c08a98f7e85ec7c9376f27a7933e75e44d672f7
wechat_staff/components/detailFooter/index.js
@@ -1,5 +1,6 @@
import {
  getContentShareImg
  getContentShareImg,
  actionDo
} from '../../api/index'
Component({
  /**
@@ -26,21 +27,25 @@
    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}&userId=${wx.getStorageSync('member').id}`,
        envVersion: 'trial'
        envVersion: 'release'
      })
    },
    handleEnjoy() {
@@ -52,7 +57,7 @@
        flag: !info.isEnjoy
      })
    },
    handleCollec() {
    handleCollec() {
      const {
        info
      } = this.data
@@ -60,13 +65,14 @@
        type: 'collec',
        flag: !info.isCollection
      })
    },
    handleDown() {
      const {
        info,
        path
      } = this.data
      let that = this
      getContentShareImg({
        articleId: `${info.id}_${path}`,
        type: '0',
@@ -77,8 +83,7 @@
          isShowPoster: true,
          showShare: false,
          posterUrl: res.data
        })
        })
      })
    },
    saveCard() {
@@ -128,6 +133,10 @@
      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)