index.js 742 B

12345678910111213141516171819202122232425262728293031323334
  1. import event from '~/mixins/event'
  2. import share from '~/mixins/share'
  3. import {
  4. formatDate
  5. } from '~/utils/util'
  6. import reachBottom from '~/mixins/reachBottom';
  7. import {
  8. getSaleInvite
  9. } from '~/api/sale'
  10. Page({
  11. behaviors: [reachBottom, share, event],
  12. data: {
  13. dateTime: formatDate(new Date(), 6),
  14. },
  15. onLoad(options) {
  16. this.resetData();
  17. },
  18. bindDateChange(e) {
  19. this.setData({
  20. dateTime: e.detail.value
  21. })
  22. this.resetData()
  23. },
  24. openInvite() {
  25. this.selectComponent("#InvitePop").openInvite()
  26. },
  27. loadMore() {
  28. this.getData(getSaleInvite, {
  29. dateTime: this.data.dateTime,
  30. pageSize: 20,
  31. });
  32. },
  33. })