cardInfo.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. var that = this;
  9. that.setData({
  10. Containnerheight: main.getWindowHeight(),
  11. });
  12. that.init(options.id);
  13. },
  14. init: function (id) {
  15. var that = this;
  16. var card={};
  17. var list = wx.getStorageSync("CardList");
  18. for (var i = 0; i < list.length; i++) {
  19. if (id == list[i].MiaoguoCardID) {
  20. card.CreateTimeStr = common.formatDateCHS(list[i].CreateTime);
  21. card.FirstTimeStr = common.formatDateCHS(list[i].FirstTime);
  22. card.LastTimeStr = common.formatDateCHS(list[i].LastTime);
  23. card.LimitTimeStr = common.formatDateCHS(list[i].LimitTime);
  24. card.LearnNumber = list[i].LearnNumber;
  25. break;
  26. }
  27. }
  28. that.setData({
  29. CardInfo: card
  30. });
  31. },
  32. onShareAppMessage: function () {
  33. return {
  34. title: app.globalData.ShareTitle,
  35. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  36. imageUrl: app.globalData.ShareImage,
  37. }
  38. },
  39. })