help.js 706 B

123456789101112131415161718192021222324252627282930313233343536
  1. var util = require('../../../utils/util.js');
  2. var api = require('../../../config/api.js');
  3. var app = getApp()
  4. // pages/ucenter/help/help.js
  5. Page({
  6. data:{
  7. helpList: []
  8. },
  9. getHelpList() {
  10. let that = this;
  11. util.request(api.HelpTypeList, {}).then(function (res) {
  12. if (res.errno === 0) {
  13. that.setData({
  14. helpList: res.data
  15. })
  16. }
  17. });
  18. },
  19. onLoad:function(options){
  20. // 页面初始化 options为页面跳转所带来的参数
  21. this.getHelpList()
  22. },
  23. onReady:function(){
  24. // 页面渲染完成
  25. },
  26. onShow:function(){
  27. // 页面显示
  28. },
  29. onHide:function(){
  30. // 页面隐藏
  31. },
  32. onUnload:function(){
  33. // 页面关闭
  34. }
  35. })