PageSourceSearch

https://thankq.market/ProductPriceCouponInfo.160d7db5.js

js thankq.market collected 2026-10-02 16:08:25 UTC 5,598 bytes, 1 lines download raw bytes

1import{_ as I,c as L,Q as w,t as N,h as u,i as _,p as t,A as r,s as d,n as h,D as m,a8 as k,F as A,x as F,E as S,G as j}from"./index.e28fc1de.js";import{_ as O}from"./download-coupon.07a8f411.js";const z="/assets/down-arrow-red.33359dd1.svg",B="/assets/detail-x.e9cc5c30.svg";const E={name:"ProductPriceCouponInfo",props:["price","salePrice","originalPrice","couponPrice","salePercent","refurbDiscount","coupons","bestCoupon","isLoggedIn","promotion","promotionDiscount","couponSalePrice","finalPrice"],emits:["handleCouponPopup"],setup(){const{emit:s,props:n}=F(),o=L({price:0,salePrice:0,couponPrice:0,coupons:[],isLoggedIn:!1,promotion:null,isCouponDown:!1,savePercent:0,isDetailOpen:!1,refurbDiscount:0,promotionDiscount:0,couponDiscount:0,hasPromotion:!1,promotionLabel:"\uD504\uB85C\uBAA8\uC158 \uC801\uC6A9",couponLabel:"\uCFE0\uD3F0 \uC801\uC6A9",finalPrice:0,bestCoupon:null}),i=e=>Array.isArray(e)?e.find(p=>p&&typeof p=="object"&&p.cbe_title)?.cbe_title||"\uD504\uB85C\uBAA8\uC158 \uC801\uC6A9":!e||typeof e!="object"?"\uD504\uB85C\uBAA8\uC158 \uC801\uC6A9":e.cbe_title||"\uD504\uB85C\uBAA8\uC158 \uC801\uC6A9",b=e=>Array.isArray(e)?e.find(a=>a&&typeof a=="object"&&a.cbe_title)||e.find(a=>a&&typeof a=="object")||null:e&&typeof e=="object"?e:null,f=e=>Array.isArray(e)?e:e&&typeof e=="object"?[e]:[],l=e=>{o.price=Number(e.price||0),o.salePrice=Number(e.salePrice||0),o.couponPrice=Number(e.couponPrice||0),o.savePercent=Number(e.salePercent||0),o.coupons=f(e.coupons),o.isLoggedIn=!!e.isLoggedIn,o.promotion=b(e.promotion),o.hasPromotion=Array.isArray(e.promotion)?e.promotion.length>0:!!e.promotion,o.refurbDiscount=Number(e.refurbDiscount),o.promotionDiscount=Number(e.promotionDiscount||0),o.couponDiscount=Number(e.couponSalePrice||0),o.finalPrice=Number(e.finalPrice||0),o.promotionLabel=i(o.promotion);const a=o.coupons,p=e.bestCoupon?e.bestCoupon[0]??a[0]:null;if(o.couponLabel=p&&p.coupon_name||"\uCFE0\uD3F0 \uC801\uC6A9",!o.isLoggedIn)o.isCouponDown=!1;else{let P=o.coupons.length>0;o.coupons.forEach(y=>{y.down_dtm==null&&(P=!1)}),o.isCouponDown=P}};w(()=>[n.price,n.salePrice,n.originalPrice,n.couponPrice,n.salePercent,n.refurbDiscount,n.coupons,n.bestCoupon,n.isLoggedIn,n.promotion,n.promotionDiscount,n.couponSalePrice,n.finalPrice],()=>{l(n)},{immediate:!0,deep:!0});const D=()=>{s("handleCouponPopup")},g=()=>{o.isDetailOpen=!o.isDetailOpen},v=()=>{o.isDetailOpen=!1},C=e=>Number(e||0).toLocaleString();return{...N(o),handleCouponPopup:D,toggleDetail:g,closeDetail:v,numberFormat:C}}},c=s=>(S("data-v-ab09e84d"),s=s(),j(),s),G={class:"coupon_price_info"},M={class:"product_price"},Q={class:"price_align"},R={key:0,class:"price_up"},T={class:"save_percent"},q={class:"coupon_price"},H=c(()=>t("span",{class:"coupon_text"},"\uCD5C\uB300\uD61C\uD0DD\uAC00",-1)),J=c(()=>t("img",{src:O,alt:"coupon icon"},null,-1)),K={key:0,class:"discount_detail"},U={class:"detail_header"},W=c(()=>t("p",{class:"detail_title"},"\uD560\uC778\uB0B4\uC5ED",-1)),X=c(()=>t("img",{src:B,alt:"close icon"},null,-1)),Y=[X],Z={class:"detail_row"},x=c(()=>t("span",{class:"detail_row_title"},"\uC815\uC0C1\uAC00",-1)),V={class:"detail_row_value"},$={class:"detail_row"},oo=c(()=>t("span",{class:"detail_row_title"},"\uB561\uD050 \uB9AC\uD37C\uBE0C \uD560\uC778",-1)),eo={class:"detail_row_value"},to={key:0,class:"promotion_sale"},so=c(()=>t("p",{class:"detail_row_title"},"\uD504\uB85C\uBAA8\uC158 \uD560\uC778",-1)),no={class:"detail_sub_row"},io={class:"coupon_label"},co=c(()=>t("span",null,"\u3134",-1)),ro={class:"detail_row_value"},ao=c(()=>t("p",{class:"detail_row_title"},"\uCFE0\uD3F0 \uD560\uC778",-1)),lo={class:"detail_sub_row"},uo={class:"coupon_label"},_o=c(()=>t("span",null,"\u3134",-1)),po={class:"detail_row_value"},mo=c(()=>t("div",{class:"detail_divider"},null,-1)),bo={class:"detail_total"},fo=c(()=>t("span",null,"\uCD5C\uB300\uD61C\uD0DD\uAC00",-1));function Po(s,n,o,i,b,f){return u(),_("div",G,[t("div",M,[t("div",Q,[o.price>o.finalPrice&&(s.couponDiscount>0||o.promotionDiscount>0||s.hasPromotion)?(u(),_("div",R,[t("span",T,r(s.savePercent)+"%",1),t("span",q,r(i.numberFormat(o.finalPrice||o.salePrice))+"\uC6D0",1)])):d("",!0),o.price>o.finalPrice&&(s.couponDiscount>0||o.promotionDiscount>0||s.hasPromotion)?(u(),_("button",{key:1,class:"price_down",type:"button",onClick:n[0]||(n[0]=(...l)=>i.toggleDetail&&i.toggleDetail(...l))},[H,t("img",{class:h({open:s.isDetailOpen}),src:z,alt:"down arrow"},null,2)])):d("",!0)]),o.coupons.length>0&&s.couponDiscount>0?(u(),_("button",{key:0,class:h(`coupon_button ${s.isCouponDown?"down":""}`),onClick:n[1]||(n[1]=(...l)=>i.handleCouponPopup&&i.handleCouponPopup(...l))},[J,m(" "+r(s.isCouponDown?"\uCFE0\uD3F0\uBCF4\uAE30":"\uCFE0\uD3F0\uBC1B\uAE30"),1)],2)):d("",!0)]),s.isDetailOpen?(u(),_("div",K,[t("div",U,[W,t("button",{class:"detail_close",type:"button",onClick:n[2]||(n[2]=k((...l)=>i.closeDetail&&i.closeDetail(...l),["stop"]))},Y)]),t("div",Z,[x,t("span",V,r(i.numberFormat(o.price))+"\uC6D0",1)]),t("div",$,[oo,t("span",eo,"- "+r(i.numberFormat(o.refurbDiscount))+"\uC6D0",1)]),s.hasPromotion?(u(),_("div",to,[so,t("div",no,[t("span",io,[co,m(r(s.promotionLabel),1)]),t("span",ro,"-"+r(i.numberFormat(o.promotionDiscount))+"\uC6D0",1)])])):d("",!0),s.couponDiscount>0?(u(),_(A,{key:1},[ao,t("div",lo,[t("span",uo,[_o,m(r(s.couponLabel),1)]),t("span",po,"-"+r(i.numberFormat(s.couponDiscount))+"\uC6D0",1)])],64)):d("",!0),mo,t("div",bo,[fo,t("span",null,r(i.numberFormat(o.finalPrice||o.salePrice))+"\uC6D0",1)])])):d("",!0)])}const go=I(E,[["render",Po],["__scopeId","data-v-ab09e84d"]]);export{go as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.