result_list.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. IsPromotion:false,
  7. SelectMenuCss1:"selectItem",
  8. SelectMenuCss2:"",
  9. },
  10. onLoad: function (options) {
  11. var that = this;
  12. var isPromotion=false;
  13. if (options.AgentCategory=="promotion"){
  14. isPromotion=true;
  15. }
  16. that.setData({
  17. Containnerheight: main.getWindowHeight(),
  18. IsPromotion:isPromotion,
  19. ListType:options.ListType,
  20. });
  21. wx.setNavigationBarTitle({
  22. title: that.data.ListType
  23. });
  24. this.getList();
  25. },
  26. getList:function(e){
  27. var that = this;
  28. var url="";
  29. url="GetIntroducerUserList2?ListType="+that.data.ListType;
  30. url+="&UserID=" + app.globalData.userInfo.UserID;
  31. main.getData(url, function (data) {
  32. wx.hideLoading();
  33. if (data) {
  34. that.setData({
  35. Info:data,
  36. });
  37. }
  38. });
  39. },
  40. onPullDownRefresh: function () {
  41. wx.stopPullDownRefresh();
  42. },
  43. onMenu:function(e){
  44. var id=e.currentTarget.dataset.id;
  45. var SelectMenuCss1="",SelectMenuCss2="";
  46. if (id==1)
  47. SelectMenuCss1="selectItem";
  48. else if (id==2)
  49. SelectMenuCss2="selectItem";
  50. this.setData({
  51. SelectMenuCss1:SelectMenuCss1,
  52. SelectMenuCss2:SelectMenuCss2,
  53. });
  54. },
  55. onShareAppMessage: function () {
  56. return {
  57. title: app.globalData.ShareTitle,
  58. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  59. imageUrl: app.globalData.ShareImage,
  60. }
  61. },
  62. })