cardInfo.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. },
  7. onLoad: function (options) {
  8. wx.hideShareMenu();
  9. var that = this;
  10. that.setData({
  11. Containnerheight: main.getWindowHeight(),
  12. });
  13. that.init(options.id);
  14. },
  15. init: function (id) {
  16. var that = this;
  17. var card={};
  18. var list = app.globalData.CardList;
  19. for (var i = 0; i < list.length; i++) {
  20. if (id == list[i].MiaoguoCardID) {
  21. card.CreateTimeStr = common.formatDateCHS(list[i].CreateTime);
  22. card.FirstTimeStr = common.formatDateCHS(list[i].FirstTime);
  23. card.LastTimeStr = common.formatDateCHS(list[i].LastTime);
  24. card.LimitTimeStr = common.formatDateCHS(list[i].LimitTime);
  25. card.LearnNumber = list[i].LearnNumber;
  26. break;
  27. }
  28. }
  29. that.setData({
  30. CardInfo: card
  31. });
  32. },
  33. onShareAppMessage: function () {
  34. return {
  35. title: app.globalData.ShareTitle,
  36. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  37. imageUrl: app.globalData.ShareImage,
  38. }
  39. },
  40. })