fcode.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // pages/fcode/fcode.js
  2. const getReq = require('./../../config.js').getReq;
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. special_datas: {},
  9. summery: []
  10. },
  11. /**
  12. * 生命周期函数--监听页面加载
  13. */
  14. onLoad: function (options) {
  15. wx.showLoading({
  16. title: '加载中'
  17. });
  18. let self = this
  19. getReq({
  20. act: 'member_fcode',
  21. op: 'list'
  22. }, function (res) {
  23. if (res.code == 200) {
  24. console.log(res);
  25. self.setData({
  26. special_datas: res.datas,
  27. summery: res.datas.summary
  28. });
  29. wx.hideLoading();
  30. }
  31. })
  32. },
  33. /**
  34. * 生命周期函数--监听页面初次渲染完成
  35. */
  36. onReady: function () {
  37. },
  38. /**
  39. * 生命周期函数--监听页面显示
  40. */
  41. onShow: function () {
  42. },
  43. /**
  44. * 生命周期函数--监听页面隐藏
  45. */
  46. onHide: function () {
  47. },
  48. /**
  49. * 生命周期函数--监听页面卸载
  50. */
  51. onUnload: function () {
  52. },
  53. /**
  54. * 页面相关事件处理函数--监听用户下拉动作
  55. */
  56. onPullDownRefresh: function () {
  57. },
  58. /**
  59. * 页面上拉触底事件的处理函数
  60. */
  61. onReachBottom: function () {
  62. }
  63. })