12345 |
- <<<<<<<< HEAD:dist/assets/index-5ba3f6e9.js
- import{d as x,dO as v,ar as _,f as t,r as c,L as I,l as S,o as u,v as A,w as F,g as l,au as i,a as r,c as d,F as L,q as V,t as E,bo as W,_ as B,__tla as G}from"./index-d75b4e4d.js";import{e as H,__tla as J}from"./couponTemplate-691eeb8f.js";import{e as M,f as K}from"./constants-40f13f5e.js";import{f as R,__tla as N}from"./formatTime-35abe1bb.js";let z,Q=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return N}catch{}})()]).then(async()=>{let y,b,g,w,C,h,D,$,k,P,T;y=x({name:"CouponDiscount",props:{coupon:v()},setup(s){const e=s.coupon;let p=e.discountPercent+"",n=" \u6298";return e.discountType===M.PRICE.type&&(p=_(e.discountPrice),n=" \u5143"),()=>t("div",null,[t("span",{class:"text-20px font-bold"},[p]),t("span",null,[n])])}}),b=x({name:"CouponDiscountDesc",props:{coupon:v()},setup(s){const e=s.coupon,p=e.usePrice>0?`\u6EE1${_(e.usePrice)}\u5143\uFF0C`:"",n=e.discountType===M.PRICE.type?`\u51CF${_(e.discountPrice)}\u5143`:`\u6253${e.discountPercent}\u6298`;return()=>t("div",null,[t("span",null,[p]),t("span",null,[n])])}}),g=x({name:"CouponValidTerm",props:{coupon:v()},setup(s){const e=s.coupon,p=e.validityType===K.DATE.type?`\u6709\u6548\u671F\uFF1A${R(e.validStartTime,"YYYY-MM-DD")} \u81F3 ${R(e.validEndTime,"YYYY-MM-DD")}`:`\u9886\u53D6\u540E\u7B2C ${e.fixedStartTerm} - ${e.fixedEndTerm} \u5929\u5185\u53EF\u7528`;return()=>t("div",null,[p])}}),w={key:0,class:"m-l-16px flex flex-row justify-between p-8px"},C={class:"flex flex-col justify-evenly gap-4px"},h={class:"flex flex-col justify-evenly"},D={key:1,class:"m-l-16px flex flex-row justify-between p-8px"},$={class:"flex flex-col justify-evenly gap-4px"},k={class:"flex flex-col"},P={key:2,class:"flex flex-col items-center justify-around gap-4px p-4px"},T=x({name:"CouponCard",__name:"index",props:{property:{type:Object,required:!0}},setup(s){const e=s,p=c([]);I(()=>e.property.couponIds,async()=>{var o;((o=e.property.couponIds)==null?void 0:o.length)>0&&(p.value=await H(e.property.couponIds))},{immediate:!0,deep:!0});const n=c(375),j=c(),Y=c("100%"),f=c(375);return I(()=>[e.property,n,p.value.length],()=>{f.value=(.95*n.value-e.property.space*(e.property.columns-1))/e.property.columns,Y.value=f.value*p.value.length+e.property.space*(p.value.length-1)+"px"},{immediate:!0,deep:!0}),S(()=>{var o,m;n.value=((m=(o=j.value)==null?void 0:o.wrapRef)==null?void 0:m.offsetWidth)||375}),(o,m)=>{const q=W;return u(),A(q,{class:"z-1 min-h-30px","wrap-class":"w-full",ref_key:"containerRef",ref:j},{default:F(()=>[l("div",{class:"flex flex-row text-12px",style:i({gap:`${o.property.space}px`,width:r(Y)})},[(u(!0),d(L,null,V(r(p),(a,O)=>(u(),d("div",{class:"box-content",style:i({background:o.property.bgImg?`url(${o.property.bgImg}) 100% center / 100% 100% no-repeat`:"#fff",width:`${r(f)}px`,color:o.property.textColor}),key:O},[o.property.columns===1?(u(),d("div",w,[l("div",C,[t(r(y),{coupon:a},null,8,["coupon"]),t(r(b),{coupon:a},null,8,["coupon"]),t(r(g),{coupon:a},null,8,["coupon"])]),l("div",h,[l("div",{class:"rounded-20px p-x-8px p-y-2px",style:i({color:o.property.button.color,background:o.property.button.bgColor})}," \u7ACB\u5373\u9886\u53D6 ",4)])])):o.property.columns===2?(u(),d("div",D,[l("div",$,[t(r(y),{coupon:a},null,8,["coupon"]),l("div",null,E(a.name),1)]),l("div",k,[l("div",{class:"h-full w-20px rounded-20px p-x-2px p-y-8px text-center",style:i({color:o.property.button.color,background:o.property.button.bgColor})}," \u7ACB\u5373\u9886\u53D6 ",4)])])):(u(),d("div",P,[t(r(y),{coupon:a},null,8,["coupon"]),l("div",null,E(a.name),1),l("div",{class:"rounded-20px p-x-8px p-y-2px",style:i({color:o.property.button.color,background:o.property.button.bgColor})}," \u7ACB\u5373\u9886\u53D6 ",4)]))],4))),128))],4)]),_:1},512)}}}),z=B(T,[["__file","D:/zx/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/CouponCard/index.vue"]])});export{Q as __tla,z as default};
- ========
- import{d as x,dO as v,ar as _,f as t,r as c,L as I,l as S,o as u,v as A,w as F,g as l,au as i,a as r,c as d,F as L,q as V,t as E,bo as W,_ as B,__tla as G}from"./index-c9fff140.js";import{e as H,__tla as J}from"./couponTemplate-22639fca.js";import{e as M,f as K}from"./constants-40f13f5e.js";import{f as z,__tla as N}from"./formatTime-928d70c3.js";let R,Q=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return N}catch{}})()]).then(async()=>{let y,b,g,w,C,h,D,$,k,P,T;y=x({name:"CouponDiscount",props:{coupon:v()},setup(s){const e=s.coupon;let p=e.discountPercent+"",n=" \u6298";return e.discountType===M.PRICE.type&&(p=_(e.discountPrice),n=" \u5143"),()=>t("div",null,[t("span",{class:"text-20px font-bold"},[p]),t("span",null,[n])])}}),b=x({name:"CouponDiscountDesc",props:{coupon:v()},setup(s){const e=s.coupon,p=e.usePrice>0?`\u6EE1${_(e.usePrice)}\u5143\uFF0C`:"",n=e.discountType===M.PRICE.type?`\u51CF${_(e.discountPrice)}\u5143`:`\u6253${e.discountPercent}\u6298`;return()=>t("div",null,[t("span",null,[p]),t("span",null,[n])])}}),g=x({name:"CouponValidTerm",props:{coupon:v()},setup(s){const e=s.coupon,p=e.validityType===K.DATE.type?`\u6709\u6548\u671F\uFF1A${z(e.validStartTime,"YYYY-MM-DD")} \u81F3 ${z(e.validEndTime,"YYYY-MM-DD")}`:`\u9886\u53D6\u540E\u7B2C ${e.fixedStartTerm} - ${e.fixedEndTerm} \u5929\u5185\u53EF\u7528`;return()=>t("div",null,[p])}}),w={key:0,class:"m-l-16px flex flex-row justify-between p-8px"},C={class:"flex flex-col justify-evenly gap-4px"},h={class:"flex flex-col justify-evenly"},D={key:1,class:"m-l-16px flex flex-row justify-between p-8px"},$={class:"flex flex-col justify-evenly gap-4px"},k={class:"flex flex-col"},P={key:2,class:"flex flex-col items-center justify-around gap-4px p-4px"},T=x({name:"CouponCard",__name:"index",props:{property:{type:Object,required:!0}},setup(s){const e=s,p=c([]);I(()=>e.property.couponIds,async()=>{var o;((o=e.property.couponIds)==null?void 0:o.length)>0&&(p.value=await H(e.property.couponIds))},{immediate:!0,deep:!0});const n=c(375),j=c(),Y=c("100%"),f=c(375);return I(()=>[e.property,n,p.value.length],()=>{f.value=(.95*n.value-e.property.space*(e.property.columns-1))/e.property.columns,Y.value=f.value*p.value.length+e.property.space*(p.value.length-1)+"px"},{immediate:!0,deep:!0}),S(()=>{var o,m;n.value=((m=(o=j.value)==null?void 0:o.wrapRef)==null?void 0:m.offsetWidth)||375}),(o,m)=>{const q=W;return u(),A(q,{class:"z-1 min-h-30px","wrap-class":"w-full",ref_key:"containerRef",ref:j},{default:F(()=>[l("div",{class:"flex flex-row text-12px",style:i({gap:`${o.property.space}px`,width:r(Y)})},[(u(!0),d(L,null,V(r(p),(a,O)=>(u(),d("div",{class:"box-content",style:i({background:o.property.bgImg?`url(${o.property.bgImg}) 100% center / 100% 100% no-repeat`:"#fff",width:`${r(f)}px`,color:o.property.textColor}),key:O},[o.property.columns===1?(u(),d("div",w,[l("div",C,[t(r(y),{coupon:a},null,8,["coupon"]),t(r(b),{coupon:a},null,8,["coupon"]),t(r(g),{coupon:a},null,8,["coupon"])]),l("div",h,[l("div",{class:"rounded-20px p-x-8px p-y-2px",style:i({color:o.property.button.color,background:o.property.button.bgColor})}," \u7ACB\u5373\u9886\u53D6 ",4)])])):o.property.columns===2?(u(),d("div",D,[l("div",$,[t(r(y),{coupon:a},null,8,["coupon"]),l("div",null,E(a.name),1)]),l("div",k,[l("div",{class:"h-full w-20px rounded-20px p-x-2px p-y-8px text-center",style:i({color:o.property.button.color,background:o.property.button.bgColor})}," \u7ACB\u5373\u9886\u53D6 ",4)])])):(u(),d("div",P,[t(r(y),{coupon:a},null,8,["coupon"]),l("div",null,E(a.name),1),l("div",{class:"rounded-20px p-x-8px p-y-2px",style:i({color:o.property.button.color,background:o.property.button.bgColor})}," \u7ACB\u5373\u9886\u53D6 ",4)]))],4))),128))],4)]),_:1},512)}}}),R=B(T,[["__file","D:/zx/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/CouponCard/index.vue"]])});export{Q as __tla,R as default};
- >>>>>>>> 2589804fb89eb98fd6498c1ee41a354dcce32af3:dist/assets/index-f08d9e26.js
|