"use strict"; const common_vendor = require("../../../common/vendor.js"); const pagesOne_winner_utils_source = require("../utils/source.js"); const hooks_useDraw = require("../../../hooks/useDraw.js"); if (!Array) { const _easycom_wd_gap2 = common_vendor.resolveComponent("wd-gap"); const _easycom_wd_popup2 = common_vendor.resolveComponent("wd-popup"); (_easycom_wd_gap2 + _easycom_wd_popup2)(); } const _easycom_wd_gap = () => "../../../node-modules/wot-design-uni/components/wd-gap/wd-gap.js"; const _easycom_wd_popup = () => "../../../node-modules/wot-design-uni/components/wd-popup/wd-popup.js"; if (!Math) { (_easycom_wd_gap + _easycom_wd_popup)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "uploadReceptPopop", props: { show: { type: Boolean, default: false }, list: Array }, emits: ["update:show"], setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; common_vendor.ref("1"); const toUploadImage = (type) => { if (!discountId.value) return common_vendor.index.showToast({ title: "请先选择优惠力度", icon: "none" }); common_vendor.index.navigateTo({ url: `/pagesOne/winner/uploadImage?discountId=${discountId.value}&discountLevel=${discountLevel.value}` }); }; const discountId = common_vendor.ref(""); const discountLevel = common_vendor.ref(""); const radioChange = (e) => { discountId.value = e.detail.value; const obj = props.list.filter((item) => item.id === e.detail.value)[0]; discountLevel.value = `满${obj.thresholdAmount}返${obj.cashbackAmount}`; }; const { handleClose } = hooks_useDraw.useDraw(props, emit); return (_ctx, _cache) => { return { a: common_vendor.f(props.list, (item, k0, i0) => { return { a: common_vendor.t(item.thresholdAmount), b: common_vendor.t(item.cashbackAmount), c: item.id, d: item.checked, e: item.id, f: common_vendor.n(item.checked ? "active" : "static") }; }), b: common_vendor.unref(pagesOne_winner_utils_source.imgObj).icon1, c: common_vendor.o(radioChange), d: common_vendor.o(toUploadImage), e: common_vendor.p({ height: "16rpx", ["bg-color"]: "#F7F8F9" }), f: common_vendor.o( //@ts-ignore (...args) => common_vendor.unref(handleClose) && common_vendor.unref(handleClose)(...args) ), g: common_vendor.o(common_vendor.unref(handleClose)), h: common_vendor.o(($event) => props.show = $event), i: common_vendor.p({ position: "bottom", ["safe-area-inset-bottom"]: true, ["custom-style"]: "max-height: 922rpx;border-radius: 40rpx 40rpx 0 0;", modelValue: props.show }) }; }; } }); wx.createComponent(_sfc_main);