爱简收旧衣按件回收前端代码仓库
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.

109 lines
3.6 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. isQualified: false,
  9. // 是否合格
  10. orderNo: "RE82738127861525",
  11. // 回收编号
  12. pickupTime: "2025-04-20 11:00",
  13. // 回收时间
  14. resultDescription: "感谢您参与旧衣回收活动,支持环保事业。",
  15. // 结果说明
  16. reasons: [
  17. {
  18. title: "大面积破损",
  19. detail: "破损无法修复"
  20. },
  21. {
  22. title: "污渍无法清除",
  23. detail: "严重污渍"
  24. },
  25. {
  26. title: "附件缺失",
  27. detail: "重要配件缺失"
  28. },
  29. {
  30. title: "带有危险物品",
  31. detail: "不符合安全标准"
  32. },
  33. {
  34. title: "尺寸过小",
  35. detail: "不符合回收标准"
  36. },
  37. {
  38. title: "尺寸过大",
  39. detail: "超出处理范围"
  40. }
  41. ]
  42. };
  43. },
  44. onLoad(options) {
  45. if (options.status) {
  46. this.isQualified = options.status === "qualified";
  47. this.resultDescription = this.isQualified ? "我们已收到您的旧衣,并完成质检。很高兴地通知您,此次回收的旧衣全部符合回收标准。" : "感谢您参与旧衣回收活动,支持环保事业。我们已收到您的旧衣,并完成质检。遗憾地通知您,此次回收的部分旧衣不符合回收标准。";
  48. }
  49. },
  50. methods: {
  51. async onRefresh() {
  52. await new Promise((resolve) => setTimeout(resolve, 1e3));
  53. common_vendor.index.stopPullRefresh();
  54. },
  55. goBack() {
  56. common_vendor.index.navigateBack();
  57. },
  58. viewDetail(reason) {
  59. common_vendor.index.showModal({
  60. title: reason.title,
  61. content: reason.detail,
  62. showCancel: false
  63. });
  64. },
  65. reorder() {
  66. common_vendor.index.navigateTo({
  67. url: "/pages/pickup/index"
  68. });
  69. }
  70. }
  71. };
  72. const __injectCSSVars__ = () => {
  73. common_vendor.useCssVars((_ctx) => ({
  74. "f5ca2768": _ctx.isQualified ? "0" : "calc(120rpx + env(safe-area-inset-bottom))"
  75. }));
  76. };
  77. const __setup__ = _sfc_main.setup;
  78. _sfc_main.setup = __setup__ ? (props, ctx) => {
  79. __injectCSSVars__();
  80. return __setup__(props, ctx);
  81. } : __injectCSSVars__;
  82. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  83. return common_vendor.e({
  84. a: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
  85. b: common_vendor.t($data.isQualified ? "合格" : "不合格"),
  86. c: common_vendor.n($data.isQualified ? "qualified" : "unqualified"),
  87. d: common_vendor.t($data.resultDescription),
  88. e: common_vendor.t($data.orderNo),
  89. f: common_vendor.t($data.pickupTime),
  90. g: !$data.isQualified
  91. }, !$data.isQualified ? {
  92. h: common_vendor.f($data.reasons, (reason, index, i0) => {
  93. return {
  94. a: common_vendor.t(reason.title),
  95. b: common_vendor.o(($event) => $options.viewDetail(reason), index),
  96. c: index
  97. };
  98. })
  99. } : {}, {
  100. i: !$data.isQualified
  101. }, !$data.isQualified ? {
  102. j: common_vendor.o((...args) => $options.reorder && $options.reorder(...args))
  103. } : {}, {
  104. k: common_vendor.s(_ctx.__cssVars())
  105. });
  106. }
  107. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-11a7f7fa"]]);
  108. wx.createPage(MiniProgramPage);
  109. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/subcomponent/inspection.js.map