partyItem.js 1018 B

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