roomItem.js 822 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // components/house-item/house-item.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. room: Object
  8. },
  9. options: {
  10. addGlobalClass: true,
  11. },
  12. /**
  13. * 组件的初始数据
  14. */
  15. data: {
  16. },
  17. /**
  18. * 组件的方法列表
  19. */
  20. methods: {
  21. gotoWV(e) {
  22. let {
  23. id,
  24. index
  25. } = e.currentTarget.dataset
  26. console.log(id)
  27. let data = {
  28. id: id,
  29. index: index,
  30. }
  31. this.triggerEvent('gotoWV', data)
  32. }
  33. // toDetail () {
  34. // getApp().autoSubcrebe && getApp().autoSubcrebe()
  35. // getApp().globalData.lastHouse = this.properties.house
  36. // console.log(this.properties.house)
  37. // wx.navigateTo({
  38. // url: `/pages/detail/detail?house_id=${this.properties.house.house_id}`
  39. // })
  40. // }
  41. }
  42. })