giftlist.js 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. List:[],
  7. },
  8. onLoad: function (options) {
  9. this.setData({
  10. Containnerheight: common.getSystemHeight(),
  11. });
  12. this.init();
  13. },
  14. init:function(){
  15. var that = this;
  16. server.getData('GetGiftListByUserID500?UserID=' + app.globalData.userInfo.UserID + "&ProductID=" + app.globalData.ProgramID, function (data) {
  17. if (data) {
  18. that.setData({
  19. List: data,
  20. });
  21. }
  22. });
  23. },
  24. goto: function (e) {
  25. var id=e.currentTarget.dataset.id;
  26. wx.navigateTo({
  27. url: "./giftinfo?id="+id,
  28. });
  29. },
  30. gotoGiftList: function () {
  31. wx.navigateTo({
  32. url: "./list?IsGift=1",
  33. });
  34. },
  35. onShareAppMessage: function () {
  36. return {
  37. title: app.globalData.ShareTitle,
  38. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  39. imageUrl: app.globalData.ShareImage,
  40. }
  41. },
  42. })