jiangping
2024-07-26 2faa6546a9f9ddb29f81cbc9770fc25b95703695
wechat_staff/pages/kefu/fond.js
@@ -24,6 +24,7 @@
      item.checked = false
    })
    wx.setStorageSync('enjoyList', enjoyList)
    console.log(this.data.enjoyList)
    this.initData()
  },
@@ -65,9 +66,27 @@
      }
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
  itemClick(e) {
    let map = [
      '/pages/detailDis/product',
      '/pages/detailDis/case',
      '/pages/detailDis/realpic',
      '/pages/consult/detail',
    ]
    const { id, type } = e.currentTarget.dataset
    wx.navigateTo({
      url: map[type] + '?id=' + id,
    })
  },
  bind() {
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const temp = enjoyList.filter(i => i.checked)
    if(temp.length == 0) return wx.showToast({
      title: '请先选择要关联的商品',icon:'none'
    })
    wx.navigateTo({
      url: '/pages/kefu/select',
    })
@@ -86,7 +105,7 @@
    let that = this
    getContentShareImg({
      articleId: obj.id + '&' + obj.joinType,
      type: '1',
      type: '0',
      // pageUrl: path,
      imgurl: obj.coverImage,
    }).then(res => {
@@ -161,6 +180,7 @@
            }
          })
          wx.setStorageSync('enjoyList', enjoyListTemp)
          that.initData()
        }
      }
@@ -173,6 +193,7 @@
      item.checked = !item.checked
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
  openShare() {