s-coupon-get.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. if (!Array) {
  4. const _easycom_s_coupon_list2 = common_vendor.resolveComponent("s-coupon-list");
  5. const _easycom_su_popup2 = common_vendor.resolveComponent("su-popup");
  6. (_easycom_s_coupon_list2 + _easycom_su_popup2)();
  7. }
  8. const _easycom_s_coupon_list = () => "../s-coupon-list/s-coupon-list.js";
  9. const _easycom_su_popup = () => "../../ui/su-popup/su-popup.js";
  10. if (!Math) {
  11. (_easycom_s_coupon_list + _easycom_su_popup)();
  12. }
  13. const _sfc_main = {
  14. __name: "s-coupon-get",
  15. props: {
  16. modelValue: {
  17. type: Object,
  18. default() {
  19. }
  20. },
  21. show: {
  22. type: Boolean,
  23. default: false
  24. }
  25. },
  26. emits: ["get", "close"],
  27. setup(__props, { emit: emits }) {
  28. const props = __props;
  29. const state = common_vendor.reactive({
  30. couponInfo: common_vendor.computed(() => props.modelValue)
  31. });
  32. const getBuy = (id) => {
  33. emits("get", id);
  34. };
  35. return (_ctx, _cache) => {
  36. return {
  37. a: common_vendor.f(state.couponInfo, (item, k0, i0) => {
  38. return {
  39. a: common_vendor.t(item.canTake ? "立即领取" : "已领取"),
  40. b: common_vendor.n(!item.canTake ? "boder-btn" : ""),
  41. c: common_vendor.o(($event) => getBuy(item.id), item.id),
  42. d: !item.canTake,
  43. e: "f49e1509-1-" + i0 + ",f49e1509-0",
  44. f: common_vendor.p({
  45. data: item
  46. }),
  47. g: item.id
  48. };
  49. }),
  50. b: common_vendor.o(($event) => emits("close")),
  51. c: common_vendor.p({
  52. show: __props.show,
  53. type: "bottom",
  54. round: "20",
  55. showClose: true,
  56. backgroundColor: "#f2f2f2"
  57. })
  58. };
  59. };
  60. }
  61. };
  62. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f49e1509"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/sheep/components/s-coupon-get/s-coupon-get.vue"]]);
  63. wx.createComponent(Component);