index.js 516 B

12345678910111213141516171819202122232425262728293031323334353637
  1. let App = getApp();
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. list: [],
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad: function (options) {
  13. },
  14. /**
  15. * 生命周期函数--监听页面显示
  16. */
  17. onShow: function () {
  18. // 获取帮助列表
  19. this.getHelpList();
  20. },
  21. /**
  22. * 获取帮助列表
  23. */
  24. getHelpList: function () {
  25. let _this = this;
  26. App._get('wxapp/help', {}, function (result) {
  27. _this.setData(result.data);
  28. });
  29. },
  30. })