index.js 538 B

123456789101112131415161718192021222324252627
  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. console.log(options);
  14. this.setData({
  15. exampleId: options.exampleId
  16. })
  17. this.resetData()
  18. },
  19. loadMore() {
  20. this.getData(getUserReadByExampleId, {
  21. exampleId: this.data.exampleId
  22. })
  23. },
  24. onReachBottom() {
  25. this.loadMore()
  26. }
  27. })