index.js 620 B

123456789101112131415161718192021222324252627282930313233343536
  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. this.setData({
  17. list
  18. })
  19. },
  20. jumpUserInfo({
  21. currentTarget
  22. }) {
  23. wx.navigateTo({
  24. url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=user`,
  25. })
  26. },
  27. jumpWork({
  28. currentTarget
  29. }) {
  30. console.log(currentTarget);
  31. wx.navigateTo({
  32. url: `/pages/userWorks/index?id=${currentTarget.dataset.id}`,
  33. })
  34. },
  35. })