my.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import APIClient from '../../utils/APIClient.js'
  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. address: ['北京海淀', '中关村', '三小'],
  13. schoolCity: '',
  14. schoolName: '',
  15. playNum: 31549,
  16. attentionCount: 10254,
  17. point: 6317,
  18. flowerNum: 56245,
  19. user: {}
  20. }
  21. });
  22. that.getUserWorksInfo();
  23. that.toMyEdit = (e) => {
  24. let title = e.currentTarget.dataset.title;
  25. wx.navigateTo({
  26. url: `../user/myEdit/myEdit?title=${title}`
  27. });
  28. },
  29. that.toMyConcern = e => {
  30. let title = e.currentTarget.dataset.title;
  31. wx.navigateTo({
  32. url: `../user/myconcern/myconcern?title=${title}`
  33. });
  34. }
  35. that.toMyWallet = e => {
  36. let title = e.currentTarget.dataset.title;
  37. wx.navigateTo({
  38. url: `../user/myWallet/myWallet?title=${title}`
  39. });
  40. },
  41. that.toMyCourse = e => {
  42. let title = e.currentTarget.dataset.title;
  43. wx.navigateTo({
  44. url: `../user/mycourse/mycourse?title=${title}`
  45. });
  46. },
  47. that.toMyRead = e => {
  48. let title = e.currentTarget.dataset.title;
  49. wx.navigateTo({
  50. url: `../user/myread/myread?title=${title}`
  51. });
  52. },
  53. that.toMyKeep = e => {
  54. let title = e.currentTarget.dataset.title;
  55. wx.navigateTo({
  56. url: `../user/mycollection/mycollection?title=${title}`
  57. });
  58. },
  59. that.toMyCollage = e => {
  60. let title = e.currentTarget.dataset.title;
  61. wx.navigateTo({
  62. url: `../../pages/groupPage/my-group/my-group?title=${title}`
  63. });
  64. debugger
  65. APIClient.myWallet().success(res => {
  66. debugger
  67. console.log(res.data.data.data);
  68. });
  69. }
  70. }