invitees.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // pages/invitees/invitees.js
  2. const config = require('../../config.js')
  3. const getReq = config.getReq
  4. const app = getApp();
  5. Page({
  6. /**
  7. * 页面的初始数据
  8. */
  9. data: {
  10. list: []
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad: function (options) {
  16. this.getData()
  17. },
  18. getData(){
  19. getReq(app,{
  20. act: 'member_invitee',
  21. op: 'list'
  22. }, (res) => {
  23. if (res.code == 200) {
  24. if(res.datas) {
  25. this.setData({list: res.datas })
  26. }
  27. } else {
  28. app.showToast(res.message)
  29. }
  30. })
  31. },
  32. itemHandleClick(e){
  33. const currentData = e.currentTarget.dataset
  34. const { item } = currentData
  35. console.log(item)
  36. },
  37. /**
  38. * 生命周期函数--监听页面初次渲染完成
  39. */
  40. onReady: function () {
  41. },
  42. /**
  43. * 生命周期函数--监听页面显示
  44. */
  45. onShow: function () {
  46. },
  47. /**
  48. * 生命周期函数--监听页面隐藏
  49. */
  50. onHide: function () {
  51. },
  52. /**
  53. * 生命周期函数--监听页面卸载
  54. */
  55. onUnload: function () {
  56. },
  57. /**
  58. * 页面相关事件处理函数--监听用户下拉动作
  59. */
  60. onPullDownRefresh: function () {
  61. },
  62. /**
  63. * 页面上拉触底事件的处理函数
  64. */
  65. onReachBottom: function () {
  66. },
  67. /**
  68. * 用户点击右上角分享
  69. */
  70. onShareAppMessage: function () {
  71. }
  72. })