// component/waterFlowLayout/waterFlowLayout.js
const wxService = require('../../utils/wxService')

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    imageData: {
      type: Array,
      value: [],
    },

  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onTapLike(e){
      const { memberId } = wx.getStorageSync('_baseUserInfo')
      let  params = {
        contentId: e.currentTarget.dataset.id,
        type: e.currentTarget.dataset.type,
        userId: memberId
      }
      this.triggerEvent('updataLike', params)
    },

    //详情
    gotoDetail(e){
      wxService.router(`/pages/wantToBuyDetail/wantToBuyDetail?id=${e.currentTarget.dataset.id}`)
    }
  }
})
