paylist.js 1021 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. PayList:[],
  7. },
  8. onLoad: function (options) {
  9. this.setData({
  10. Height: common.getSystemHeight(),
  11. });
  12. this.init();
  13. },
  14. init: function () {
  15. var that = this;
  16. server.getData('GetHanziUserPayInfoList?UserID=' + app.globalData.userInfo.UserID, function (data) {
  17. if (data) {
  18. var list=[];
  19. for(var i=data.List.length-1;i>=0;i--){
  20. list.push(data.List[i]);
  21. }
  22. var serviceTime = data.ProductServiceTime;
  23. if (serviceTime == "2099年12月31日")
  24. serviceTime = "永久有效";
  25. that.setData({
  26. ProductServiceTime: serviceTime,
  27. PayList: list,
  28. });
  29. }
  30. });
  31. },
  32. onShareAppMessage: function () {
  33. return {
  34. title: app.globalData.ShareTitle,
  35. path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
  36. imageUrl: '../../images/07001.png',
  37. }
  38. },
  39. })