paylist.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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: '让阅读赢在起点',
  35. path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
  36. imageUrl: '../../images/07001.png',
  37. success: function (res) {
  38. },
  39. fail: function (err) {
  40. console.log(err);
  41. },
  42. complete: function (res) {
  43. console.log(res);
  44. },
  45. }
  46. },
  47. })