acdr-ui/dist/build/mp-weixin/sheep/components/s-discount-list/s-discount-list.js

2 lines
1.2 KiB
JavaScript

"use strict";const o=require("../../../common/vendor.js"),e=require("../../index.js");if(!Array){o.resolveComponent("su-popup")()}Math;const t={__name:"s-discount-list",props:{promoInfo:{type:Array,default:()=>[]},goodsList:{type:Array,default:()=>[]},modelValue:{type:Object,default(){}},show:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:s}){const r=t,u=s,d=o.reactive({orderInfo:o.computed((()=>r.modelValue))}),i=o=>{let e="";return d.orderInfo.goods_list.forEach((t=>{o==t.goods_id&&(e=t.goods.image)})),e};return(s,r)=>({a:o.f(d.orderInfo.promo_infos,((t,s,r)=>o.e({a:o.t(t.goods_ids.length),b:"full_discount"===t.activity_type},"full_discount"===t.activity_type?{c:o.t(t.discount_rule.full),d:o.t(t.discount_rule.discount)}:{},{e:"full_gift"===t.activity_type},(t.activity_type,{}),{f:"full_reduce"===t.activity_type},"full_reduce"===t.activity_type?{g:o.t(t.discount_rule.full),h:o.t(t.discount_rule.discount)}:{},{i:o.t(t.promo_discount_money||"0.00"),j:o.f(t.goods_ids,((t,s,r)=>({a:o.unref(e.sheep).$url.cdn(i(t)),b:t}))),k:s}))),b:o.o((o=>u("close"))),c:o.o((o=>u("close"))),d:o.p({show:t.show,type:"bottom",round:"20",showClose:!0,backgroundColor:"#f2f2f2"})})}},s=o._export_sfc(t,[["__scopeId","data-v-4654e5d1"]]);wx.createComponent(s);