my.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. export const myInit = (that) => {
  2. that.setData({
  3. myData: {
  4. title: '修改资料',
  5. concern: '我的关注',
  6. course: '我的课程',
  7. read: '我的朗读',
  8. keep: '我的收藏',
  9. collage: '我的拼团',
  10. wallet: '我的钱包',
  11. address: ['北京海淀', '中关村', '三小'],
  12. schoolCity: '',
  13. schoolName: '',
  14. playNum: 31549,
  15. attentionCount: 10254,
  16. point: 6317,
  17. flowerNum: 56245,
  18. user: {}
  19. }
  20. });
  21. that.getUserWorksInfo();
  22. that.toMyEdit = (e) => {
  23. let title = e.currentTarget.dataset.title;
  24. wx.navigateTo({
  25. url: `../user/myEdit/myEdit?title=${title}`
  26. });
  27. },
  28. that.toMyConcern = e => {
  29. let title = e.currentTarget.dataset.title;
  30. wx.navigateTo({
  31. url: `../user/myconcern/myconcern?title=${title}`
  32. });
  33. }
  34. that.toMyWallet = e => {
  35. let title = e.currentTarget.dataset.title;
  36. wx.navigateTo({
  37. url: `../user/myWallet/myWallet?title=${title}`
  38. });
  39. },
  40. that.toMyCourse = e => {
  41. let title = e.currentTarget.dataset.title;
  42. wx.navigateTo({
  43. url: `../user/mycourse/mycourse?title=${title}`
  44. });
  45. },
  46. that.toMyRead = e => {
  47. let title = e.currentTarget.dataset.title;
  48. wx.navigateTo({
  49. url: `../user/myread/myread?title=${title}`
  50. });
  51. },
  52. that.toMyKeep = e => {
  53. let title = e.currentTarget.dataset.title;
  54. wx.navigateTo({
  55. url: `../user/mycollection/mycollection?title=${title}`
  56. });
  57. },
  58. that.toMyCollage = e => {
  59. let title = e.currentTarget.dataset.title;
  60. wx.navigateTo({
  61. url: `../../pages/groupPage/my-group/my-group?title=${title}`
  62. });
  63. debugger
  64. APIClient.myWallet().success(res => {
  65. debugger
  66. console.log(res.data.data.data);
  67. });
  68. }
  69. }