my.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import APIClient from '../../utils/APIClient'
  2. export const myInit = (that) => {
  3. that.setData({
  4. myData: {
  5. title: '修改资料',
  6. concern: '我的关注',
  7. address:['北京海淀','中关村','三小'],
  8. playNum: 31549,
  9. attentionCount: 10254,
  10. point: 6317,
  11. flowerNum: 56245,
  12. user: {}
  13. }
  14. })
  15. that.toMyEdit = (e) => {
  16. let title = e.currentTarget.dataset.title;
  17. wx.navigateTo({
  18. url: `../user/myEdit/myEdit?title=${title}`
  19. });
  20. },
  21. that.toMyConcern = e => {
  22. let title = e.currentTarget.dataset.title;
  23. wx.navigateTo({
  24. url: `../user/myconcern/myconcern?title=${title}`
  25. });
  26. }
  27. that.userInfo = function () {
  28. // APIClient.getUserInfo()
  29. const userInfo = wx.getStorageSync('user');
  30. console.log(userInfo);
  31. // getOpenidSessionKey((res) => {
  32. // console.log('个人',res);
  33. // that.data.myData.user = res.data.data.data;
  34. // that.setData({
  35. // myData: that.data.myData
  36. // })
  37. // },(error) => {
  38. //
  39. // })
  40. }()
  41. }