index.js 512 B

1234567891011121314151617181920212223242526
  1. import share from '~/mixins/share'
  2. import {
  3. getUserReadByExampleId
  4. } from '~/api/works'
  5. import reachBottom from '~/mixins/reachBottom'
  6. import event from '~/mixins/event'
  7. Page({
  8. behaviors: [reachBottom,share,event],
  9. data: {
  10. exampleId: ''
  11. },
  12. onLoad(options) {
  13. this.setData({
  14. exampleId: options.exampleId
  15. })
  16. this.resetData()
  17. },
  18. loadMore() {
  19. this.getData(getUserReadByExampleId, {
  20. exampleId: this.data.exampleId
  21. })
  22. },
  23. onReachBottom() {
  24. this.loadMore()
  25. }
  26. })