爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
4.1 KiB

  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const pages_mixins_pullRefreshMixin = require("../mixins/pullRefreshMixin.js");
  4. const _sfc_main = {
  5. mixins: [pages_mixins_pullRefreshMixin.pullRefreshMixin],
  6. data() {
  7. return {
  8. statusBarHeight: 0,
  9. bannerBaseHeight: 300,
  10. currentTab: "settlement",
  11. settlementRecords: [
  12. { type: "回收结算", date: "04-27", amount: "100.24" },
  13. { type: "回收结算", date: "04-23", amount: "171.42" },
  14. { type: "回收结算", date: "04-17", amount: "122.02" },
  15. { type: "回收结算", date: "04-12", amount: "128.87" },
  16. { type: "回收结算", date: "04-12", amount: "106.37" },
  17. { type: "佣金结算", date: "04-09", amount: "119.90" },
  18. { type: "佣金结算", date: "04-09", amount: "160.76" },
  19. { type: "佣金结算", date: "04-07", amount: "132.02" },
  20. { type: "佣金结算", date: "03-29", amount: "172.29" }
  21. ],
  22. withdrawalRecords: [
  23. { type: "提现记录", date: "04-27", amount: "10" },
  24. { type: "提现记录", date: "04-23", amount: "60" },
  25. { type: "提现记录", date: "04-17", amount: "10" },
  26. { type: "提现记录", date: "04-12", amount: "110" },
  27. { type: "提现记录", date: "04-12", amount: "180" },
  28. { type: "提现记录", date: "04-09", amount: "30" },
  29. { type: "提现记录", date: "04-09", amount: "130" },
  30. { type: "提现记录", date: "04-07", amount: "160" },
  31. { type: "提现记录", date: "03-29", amount: "170" }
  32. ]
  33. };
  34. },
  35. computed: {
  36. image() {
  37. const item = getApp().globalData.bannerList.find((i) => i.title === "我的-轮播图");
  38. return item ? item.image : "";
  39. }
  40. },
  41. onLoad() {
  42. this.statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight;
  43. },
  44. methods: {
  45. async onRefresh() {
  46. await new Promise((resolve) => setTimeout(resolve, 1e3));
  47. common_vendor.index.stopPullRefresh();
  48. },
  49. goBack() {
  50. common_vendor.index.navigateBack();
  51. },
  52. switchTab(tab) {
  53. this.currentTab = tab;
  54. },
  55. withdraw() {
  56. common_vendor.index.navigateTo({
  57. url: "/pages/subcomponent/withdraw"
  58. });
  59. }
  60. }
  61. };
  62. if (!Array) {
  63. const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  64. _easycom_uni_icons2();
  65. }
  66. const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
  67. if (!Math) {
  68. _easycom_uni_icons();
  69. }
  70. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  71. return common_vendor.e({
  72. a: common_vendor.p({
  73. type: "left",
  74. size: "25",
  75. color: "#fff"
  76. }),
  77. b: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
  78. c: $data.statusBarHeight + 88 + "rpx",
  79. d: $data.statusBarHeight + "px",
  80. e: $options.image,
  81. f: $data.statusBarHeight + 88 + "rpx",
  82. g: $data.bannerBaseHeight + $data.statusBarHeight + 88 + "rpx",
  83. h: common_vendor.o((...args) => $options.withdraw && $options.withdraw(...args)),
  84. i: $data.currentTab === "settlement" ? 1 : "",
  85. j: common_vendor.o(($event) => $options.switchTab("settlement")),
  86. k: $data.currentTab === "withdrawal" ? 1 : "",
  87. l: common_vendor.o(($event) => $options.switchTab("withdrawal")),
  88. m: $data.currentTab === "settlement"
  89. }, $data.currentTab === "settlement" ? {
  90. n: common_vendor.f($data.settlementRecords, (item, index, i0) => {
  91. return {
  92. a: common_vendor.t(item.type),
  93. b: common_vendor.t(item.amount),
  94. c: common_vendor.t(item.date),
  95. d: index
  96. };
  97. })
  98. } : {
  99. o: common_vendor.f($data.withdrawalRecords, (item, index, i0) => {
  100. return {
  101. a: common_vendor.t(item.type),
  102. b: common_vendor.t(item.amount),
  103. c: common_vendor.t(item.date),
  104. d: index
  105. };
  106. })
  107. });
  108. }
  109. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a0e9f0c4"]]);
  110. wx.createPage(MiniProgramPage);
  111. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/subcomponent/wallet.js.map