index.js 456 B

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