coupon.js 936 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. },
  7. onLoad: function (options) {
  8. this.setData({
  9. Containnerheight: common.getSystemHeight(),
  10. ProgramList: server.getProgramList(),
  11. });
  12. this.init();
  13. },
  14. gotoFeedback: function () {
  15. server.gotoFeedback();
  16. },
  17. init: function () {
  18. var that = this;
  19. wx.showLoading({
  20. title: '请稍后',
  21. });
  22. server.getData('GetUserCouponListByUserID?IsShowAll=1&UserID=' + app.globalData.userInfo.UserID, function (data) {
  23. if (data) {
  24. that.setData({
  25. CouponList: data,
  26. });
  27. }
  28. wx.hideLoading();
  29. });
  30. },
  31. onShareAppMessage: function () {
  32. return {
  33. title: app.globalData.ShareTitle,
  34. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  35. imageUrl: app.globalData.ShareImage,
  36. }
  37. },
  38. })