// packageC/mycomponent/storeList02/storeList02.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    items: {
      type: null
    }
  },

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

  },

  /**
   * 组件的方法列表
   */
  methods: {
    //跳转至分类
    toClassify(e) {
      let id = e.currentTarget.dataset.id;
      if (this.data.skipshow) {
        wx.redirectTo({
          url: '/packageC/o2o/o2oCategory/o2oCategory?id=' + id + '&city=' + this.data.cityData + '&point=' + JSON.stringify(
            this.data.pointData)
        });
      } else {
        wx.navigateTo({
          url: '/packageC/o2o/o2oCategory/o2oCategory?id=' + id + '&city=' + this.data.cityData + '&point=' + JSON.stringify(
            this.data.pointData)
        });
      }
    },
    goToAdress(e) {
      let latitude = e.currentTarget.dataset.items.latitude;
      let longitude = e.currentTarget.dataset.items.longitude;
      let store_name = e.currentTarget.dataset.items.store_name;
      let point = app.BMapTransqqMap(parseFloat(longitude), parseFloat(latitude));
      wx.openLocation({
        latitude: point.lat,
        longitude: point.lng,
        scale: 18,
        name: store_name
      });
    },
    toGood(e) {
      let id=e.currentTarget.dataset.goods_id;
      wx.navigateTo({
        url: '/packageA/detail_v2/detail_v2?id=' + id
      });
    },
  }
});
