index.js 562 B

1234567891011121314151617181920212223242526272829303132333435
  1. const App = getApp();
  2. Component({
  3. options: {
  4. addGlobalClass: true,
  5. },
  6. /**
  7. * 组件的属性列表
  8. * 用于组件自定义设置
  9. */
  10. properties: {
  11. itemIndex: String,
  12. itemStyle: Object,
  13. dataList: Object
  14. },
  15. /**
  16. * 组件的方法列表
  17. * 更新属性和数据的方法与更新页面数据的方法类似
  18. */
  19. methods: {
  20. /**
  21. * 跳转门店详情页
  22. */
  23. _onTargetDetail(e) {
  24. wx.navigateTo({
  25. url: '/pages/shop/detail/index?shop_id=' + e.detail.target.dataset.id,
  26. });
  27. },
  28. }
  29. })