recharge-log.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const sheep_api_pay_wallet = require("../../sheep/api/pay/wallet.js");
  4. const sheep_index = require("../../sheep/index.js");
  5. const sheep_hooks_useGoods = require("../../sheep/hooks/useGoods.js");
  6. require("../../sheep/request/index.js");
  7. require("../../sheep/config/index.js");
  8. require("../../sheep/store/index.js");
  9. require("../../sheep/store/app.js");
  10. require("../../sheep/api/promotion/diy.js");
  11. require("../../sheep/platform/index.js");
  12. require("../../sheep/platform/provider/wechat/index.js");
  13. require("../../sheep/platform/provider/wechat/miniProgram.js");
  14. require("../../sheep/api/member/auth.js");
  15. require("../../sheep/api/member/social.js");
  16. require("../../sheep/api/member/user.js");
  17. require("../../sheep/platform/provider/apple/index.js");
  18. require("../../sheep/platform/share.js");
  19. require("../../sheep/router/index.js");
  20. require("../../sheep/hooks/useModal.js");
  21. require("../../sheep/helper/index.js");
  22. require("../../sheep/helper/test.js");
  23. require("../../sheep/helper/digit.js");
  24. require("../../sheep/helper/throttle.js");
  25. require("../../sheep/url/index.js");
  26. require("../../sheep/platform/pay.js");
  27. require("../../sheep/api/pay/order.js");
  28. require("../../sheep/store/user.js");
  29. require("../../sheep/store/cart.js");
  30. require("../../sheep/api/trade/cart.js");
  31. require("../../sheep/api/trade/order.js");
  32. require("../../sheep/api/promotion/coupon.js");
  33. require("../../sheep/store/sys.js");
  34. require("../../sheep/store/modal.js");
  35. require("../../sheep/config/zIndex.js");
  36. require("../../sheep/util/index.js");
  37. if (!Array) {
  38. const _easycom_s_empty2 = common_vendor.resolveComponent("s-empty");
  39. const _easycom_uni_load_more2 = common_vendor.resolveComponent("uni-load-more");
  40. const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout");
  41. (_easycom_s_empty2 + _easycom_uni_load_more2 + _easycom_s_layout2)();
  42. }
  43. const _easycom_s_empty = () => "../../sheep/components/s-empty/s-empty.js";
  44. const _easycom_uni_load_more = () => "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js";
  45. const _easycom_s_layout = () => "../../sheep/components/s-layout/s-layout.js";
  46. if (!Math) {
  47. (_easycom_s_empty + _easycom_uni_load_more + _easycom_s_layout)();
  48. }
  49. const _sfc_main = {
  50. __name: "recharge-log",
  51. setup(__props) {
  52. const state = common_vendor.reactive({
  53. pagination: {
  54. list: [],
  55. total: 0,
  56. pageNo: 1,
  57. pageSize: 5
  58. },
  59. loadStatus: ""
  60. });
  61. async function getLogList(page = 1, list_rows = 5) {
  62. const { code, data } = await sheep_api_pay_wallet.PayWalletApi.getWalletRechargePage({
  63. pageNo: page,
  64. pageSize: list_rows
  65. });
  66. if (code !== 0) {
  67. return;
  68. }
  69. state.pagination.list = common_vendor._.concat(state.pagination.list, data.list);
  70. state.pagination.total = data.total;
  71. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  72. }
  73. function loadMore() {
  74. if (state.loadStatus === "noMore") {
  75. return;
  76. }
  77. state.pagination.pageNo++;
  78. getLogList();
  79. }
  80. common_vendor.onLoad(() => {
  81. getLogList();
  82. });
  83. common_vendor.onReachBottom(() => {
  84. loadMore();
  85. });
  86. return (_ctx, _cache) => {
  87. return common_vendor.e({
  88. a: common_vendor.f(state.pagination.list, (item, k0, i0) => {
  89. return common_vendor.e({
  90. a: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(item.payPrice)),
  91. b: item.bonusPrice > 0
  92. }, item.bonusPrice > 0 ? {
  93. c: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(item.bonusPrice))
  94. } : {}, {
  95. d: common_vendor.n(item.refundStatus === 10 ? "danger-color" : "success-color"),
  96. e: common_vendor.t(item.refundStatus === 10 ? "已退款" : "已支付"),
  97. f: common_vendor.n(item.refundStatus === 10 ? "danger-color" : "success-color"),
  98. g: common_vendor.t(item.payChannelName),
  99. h: common_vendor.t(item.payOrderChannelOrderNo),
  100. i: common_vendor.t(common_vendor.unref(sheep_index.sheep).$helper.timeFormat(item.payTime, "yyyy-mm-dd hh:MM:ss")),
  101. j: item
  102. });
  103. }),
  104. b: state.pagination.total === 0
  105. }, state.pagination.total === 0 ? {
  106. c: common_vendor.p({
  107. icon: "/static/comment-empty.png",
  108. text: "暂无充值记录"
  109. })
  110. } : {}, {
  111. d: state.pagination.total > 0
  112. }, state.pagination.total > 0 ? {
  113. e: common_vendor.o(loadMore),
  114. f: common_vendor.p({
  115. status: state.loadStatus,
  116. ["content-text"]: {
  117. contentdown: "上拉加载更多"
  118. }
  119. })
  120. } : {}, {
  121. g: common_vendor.p({
  122. title: "充值记录"
  123. })
  124. });
  125. };
  126. }
  127. };
  128. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fcfe0364"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/pages/pay/recharge-log.vue"]]);
  129. wx.createPage(MiniProgramPage);