my.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import APIClient from '../../utils/APIClient';
  2. export const myInit = (that) => {
  3. that.setData({
  4. myData: {
  5. title: '修改资料',
  6. concern: '我的关注',
  7. course: '我的课程',
  8. read: '我的朗读',
  9. keep: '我的收藏',
  10. collage: '我的拼团',
  11. wallet: '我的钱包',
  12. schoolCity: '',
  13. schoolName: '',
  14. user: {}
  15. }
  16. });
  17. that.getUserWorksInfo();
  18. that.toMyEdit = (e) => {
  19. let title = e.currentTarget.dataset.title;
  20. wx.navigateTo({
  21. url: `../user/myEdit/myEdit?title=${title}`
  22. });
  23. },
  24. that.toMyConcern = e => {
  25. let title = e.currentTarget.dataset.title;
  26. wx.navigateTo({
  27. url: `../user/myconcern/myconcern?title=${title}`
  28. });
  29. }
  30. that.toMyWallet = e => {
  31. let title = e.currentTarget.dataset.title;
  32. wx.navigateTo({
  33. url: `../user/myWallet/myWallet?title=${title}`
  34. });
  35. },
  36. that.toMyCourse = e => {
  37. let title = e.currentTarget.dataset.title;
  38. wx.navigateTo({
  39. url: `../user/mycourse/mycourse?title=${title}`
  40. });
  41. },
  42. that.toMyRead = e => {
  43. let title = e.currentTarget.dataset.title;
  44. wx.navigateTo({
  45. url: `../user/myread/myread?title=${title}`
  46. });
  47. },
  48. that.toMyKeep = e => {
  49. let title = e.currentTarget.dataset.title;
  50. wx.navigateTo({
  51. url: `../user/mycollection/mycollection?title=${title}`
  52. });
  53. },
  54. that.toMyCollage = e => {
  55. let title = e.currentTarget.dataset.title;
  56. wx.navigateTo({
  57. url: `../../pages/groupPage/my-group/my-group?title=${title}`
  58. });
  59. }
  60. }