InfoType.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. const app = require('../../utils/util.js');
  2. const tool = require('../../utils/tool.js');
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. },
  9. goMyinfo() {
  10. // if (this.data.arr.length == 0) {
  11. wx.navigateTo({
  12. url: '/pages/personInfo/personInfo',
  13. })
  14. // } else {
  15. // wx.showModal({
  16. // title: '您当前有正在参加的活动,暂时不可修改个人信息哦',
  17. // showCancel: false
  18. // })
  19. // }
  20. },
  21. goMyinfoDetail() {
  22. // if (this.data.arr.length == 0) {
  23. wx.navigateTo({
  24. url: '/pages/personInfoDetail/personInfoDetail',
  25. })
  26. // } else {
  27. // wx.showModal({
  28. // title: '您当前有正在参加的活动,暂时不可修改个人信息哦',
  29. // showCancel: false
  30. // })
  31. // }
  32. },
  33. goMyTargetInfo() {
  34. // if (this.data.arr.length == 0) {
  35. wx.navigateTo({
  36. url: '/pages/targetInfo/targetInfo',
  37. })
  38. // } else {
  39. // wx.showModal({
  40. // title: '您当前有正在参加的活动,暂时不可修改目标信息哦',
  41. // showCancel: false
  42. // })
  43. // }
  44. },
  45. getActivies() {
  46. wx.request({
  47. url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/myActive',
  48. method: "get",
  49. success: (res) => {
  50. console.log(res)
  51. if (res.data.code == 0) {
  52. this.setData({
  53. arr: res.data.actives
  54. })
  55. }
  56. }
  57. })
  58. },
  59. /**
  60. * 生命周期函数--监听页面加载
  61. */
  62. onLoad: function (options) {
  63. tool.openidStatus().then(result => {
  64. this.setData({
  65. openid: result[0],
  66. sessionkey: result[1]
  67. })
  68. this.getActivies();
  69. })
  70. },
  71. /**
  72. * 生命周期函数--监听页面初次渲染完成
  73. */
  74. onReady: function () {
  75. },
  76. /**
  77. * 生命周期函数--监听页面显示
  78. */
  79. onShow: function () {
  80. },
  81. /**
  82. * 生命周期函数--监听页面隐藏
  83. */
  84. onHide: function () {
  85. },
  86. /**
  87. * 生命周期函数--监听页面卸载
  88. */
  89. onUnload: function () {
  90. },
  91. /**
  92. * 页面相关事件处理函数--监听用户下拉动作
  93. */
  94. onPullDownRefresh: function () {
  95. },
  96. /**
  97. * 页面上拉触底事件的处理函数
  98. */
  99. onReachBottom: function () {
  100. },
  101. /**
  102. * 用户点击右上角分享
  103. */
  104. onShareAppMessage: function () {
  105. }
  106. })