index.js 643 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import {
  2. getBeLikeList
  3. } from '~/api/message'
  4. Page({
  5. data: {
  6. list: []
  7. },
  8. /**
  9. * 生命周期函数--监听页面加载
  10. */
  11. onLoad(options) {
  12. this.getBeLikeList()
  13. },
  14. async getBeLikeList() {
  15. let list = await getBeLikeList()
  16. console.log(list);
  17. this.setData({
  18. list
  19. })
  20. },
  21. jumpUserInfo({
  22. currentTarget
  23. }) {
  24. wx.navigateTo({
  25. url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=user`,
  26. })
  27. },
  28. jumpWork({
  29. currentTarget
  30. }) {
  31. console.log(currentTarget);
  32. wx.navigateTo({
  33. url: `/pages/userWorks/index?id=${currentTarget.dataset.id}`,
  34. })
  35. },
  36. })