MenuBox.js 941 Bytes
Component({
  data: {},
  properties: {
    menuList: {
      type: Array,
      value: []
    }
  },
  methods: {
    toNewPage(e) {
      const { item } = e.currentTarget.dataset
      let url = ''
      if (item.supplier == 'GL_ROAD_RESCUE') {
        url = '/packageEquity/pages/road/index/index'
      } else if (item.appearance == 1) {
        let para = {
          supplier: item.supplier,
          brandName: item.brandName,
          location: true
        }
        const temp = JSON.stringify(para)
        url = '/packageSaveMoney/pages/detail/detail?param=' + temp
      } else if (item.appearance == 2) {
        let para = {
          supplier: item.supplier,
          brandName: item.brandName,
          icon: item.equityIcon
        }
        const temp = JSON.stringify(para)
        url = '/packageSaveMoney/pages/chargeDetail/chargeDetail?param=' + temp
      }
      wx.navigateTo({
        url
      })
    }
  }
})