index.js 446 B

123456789101112131415161718192021222324252627
  1. import {
  2. getBeLikeList
  3. } from '~/api/message'
  4. import reachBottom from '~/mixins/reachBottom'
  5. Page({
  6. behaviors: [reachBottom],
  7. data: {
  8. list: []
  9. },
  10. /**
  11. * 生命周期函数--监听页面加载
  12. */
  13. onLoad(options) {
  14. this.getBeLikeList()
  15. },
  16. loadMore() {
  17. this.getData(getBeLikeList)
  18. },
  19. async getBeLikeList() {
  20. let list = await getBeLikeList()
  21. console.log(list);
  22. this.setData({
  23. list
  24. })
  25. }
  26. })