limited.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. FileUrl: app.globalData.imageUrl,
  7. IsShowButton:0,
  8. },
  9. onLoad: function (options) {
  10. var IsShowButton = 0;
  11. if (options.IsShowButton)
  12. IsShowButton=options.IsShowButton;
  13. this.setData({
  14. Containnerheight: common.getSystemHeight(),
  15. IsShowButton: IsShowButton
  16. });
  17. this.init();
  18. },
  19. onUnload: function () {
  20. app.globalData.IsRefresh=true;
  21. },
  22. init: function () {
  23. var that = this;
  24. server.getData('GetWXUsersAllTime?ProductID=' + app.globalData.ProgramID + '&UserID=' + app.globalData.userInfo.UserID, function (data) {
  25. if (data) {
  26. for (var i = 0; i < data.length; i++) {
  27. var date = common.formatDateCHS(common.formatTime(new Date()));
  28. if (data[i].Time >= date)
  29. data[i].Member = "会员";
  30. else
  31. data[i].Member = "非会员";
  32. }
  33. that.setData({
  34. ProductList: data,
  35. });
  36. }
  37. });
  38. },
  39. gotoFeedback: function () {
  40. server.gotoFeedback();
  41. },
  42. gotoFinish:function(){
  43. wx.reLaunch({
  44. url: '../../pages/index/index',
  45. });
  46. },
  47. onShareAppMessage: function () {
  48. return {
  49. title: app.globalData.ShareTitle,
  50. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  51. imageUrl: app.globalData.ShareImage,
  52. }
  53. },
  54. });