closure.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. var app = getApp();
  2. var util = require('../../utils/util.js');
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. list: []
  9. },
  10. /**
  11. * 生命周期函数--监听页面加载
  12. */
  13. onLoad: function (options) {
  14. if(!util.check_login()){
  15. wx.redirectTo({
  16. url: '/lionfish_comshop/pages/user/me',
  17. })
  18. }
  19. this.getList();
  20. },
  21. getList: function(){
  22. wx.showLoading();
  23. var that = this;
  24. var token = wx.getStorageSync('token');
  25. app.util.request({
  26. 'url': 'entry/wxapp/index',
  27. 'data': {
  28. controller: 'community.get_community_hexiao_memberlist',
  29. token: token
  30. },
  31. dataType: 'json',
  32. success: function (res) {
  33. console.log(res)
  34. if(res.data.code==0){
  35. that.setData({ list: res.data.member_list })
  36. } else {
  37. console.log(res.data.log)
  38. }
  39. wx.hideLoading();
  40. }
  41. })
  42. },
  43. goQrcode: function(){
  44. wx.navigateTo({
  45. url: '/lionfish_comshop/moduleA/groupCenter/addHexiao'
  46. })
  47. },
  48. /**
  49. * 生命周期函数--监听页面显示
  50. */
  51. onShow: function () {
  52. },
  53. /**
  54. * 页面上拉触底事件的处理函数
  55. */
  56. onReachBottom: function () {
  57. }
  58. })