index.js 497 B

1234567891011121314151617181920212223242526
  1. import share from '~/mixins/share'
  2. import {
  3. getUserReadByExampleId
  4. } from '~/api/works'
  5. import reachBottom from '~/mixins/reachBottom'
  6. Page({
  7. behaviors: [reachBottom,share],
  8. data: {
  9. exampleId: ''
  10. },
  11. onLoad(options) {
  12. console.log(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. })