// components/optimization/optimization.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    businessList: {
      type: Array,
      value: []
    },
    businessData: {
      type: Array,
      value: []
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    classIndex: 0
  },

  /**
   * 组件的方法列表
   */
  methods: {
    goDetail(e) {
      let couponChannelId = e.currentTarget.dataset.id
      let couponId = e.currentTarget.dataset.couponid
      let mallTenantId = e.currentTarget.dataset.malltenantid
      tt.navigateTo({
        url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}&mallTenantId=${mallTenantId}`,
      })
    },
    setIndex(e) {
      let index = e.currentTarget.dataset.index
      let id = e.currentTarget.dataset.id
      this.triggerEvent('businessid', id)
      this.setData({
        classIndex: index
      })
    },
    goLsit() {
      tt.navigateTo({
        url: '/pages/liveLsit/liveLsit',
        success: (res) => {

        },
        fail: (res) => {

        },
      });
    }

  }
})