Component({
  properties: {
    list: {
      type: Array
    },
    callback: {
      type: Function
    }
  },
  options: {
    addGlobalClass: true
  },
  methods: {
    toDetail(e) {
      const {
        id
      } = e.currentTarget.dataset;
      this.triggerEvent('callback', id)
      wx.navigateTo({
        url: '/pages/index/message/detail?id=' + id,
      })
    }
  }
})