1import{b as X,e as oe,A as le,x as ne,y as re,a1 as ie,I as ce,g as de,m as ue,j as me,K as _e,f as ve,h as pe,i as W,d as ge,J as fe}from"./element-plus-dFzRYwvF.js";import{_ as ye}from"./index-Dxi-8Ucq.js";import{d as G,r as A,aT as se,c as r,o as t,aU as he,G as g,M as o,K as u,H as T,a9 as M,J as x,u as b,a as e,a6 as q,I as Q,P as L,C as ke,V as ee,b as we,af as Ie,aS as be}from"./vue-vendor-Ci6LFa66.js";import{u as Le,e as Y,_ as K,G as xe,h as Ae,P as te,f as Ce}from"./app-D9BfvGbJ.js";import{u as $e}from"./usePageData-Dy-GNx_r.js";import{_ as Pe,F as Se}from"./index-Cg7u2GHv.js";import{I as Ve,a as Ee,b as Fe}from"./index-C9EE8roY.js";import{_ as ae}from"./LazyImg.vue_vue_type_script_setup_true_lang-B-WdhaxS.js";import{N as Be,P as Ue,a as Re,S as Te}from"./swiper-D8wi7hco.js";import{p as ze}from"./parse-faq-html-DPbUlDg4.js";import"./vendor-DdlRoXoG.js";import"./user-CxLrZliI.js";const De={class:"best_seller"},Me={key:0,class:"pageswiper mt-2"},Ne={class:"best_li"},Oe={class:"imgTp"},He=["onClick"],qe={key:0,class:"skuImg"},je=["onClick"],Ge=["onClick"],Ke={class:"name f3 line12"},Je={key:0,class:"info f14 fc66"},We={class:"price f20 f2 mt-1"},Ye=G({__name:"other",props:{goodsList:{type:Array,default:[]}},emits:["hotDetail"],setup(m,{emit:i}){const w=A([Be,Ue]);se();const f=Le();A(!1);const k={640:{slidesPerView:1,spaceBetween:0},768:{slidesPerView:3,spaceBetween:0},1024:{slidesPerView:5,spaceBetween:0}},_=E=>{window.location.href=E};return(E,l)=>{const P=ae,N=X,c=oe,C=le;return t(),r("section",De,[l[1]||(l[1]=he('<div class="container" data-v-506de75b><div class="row align-items-center" data-v-506de75b><div class="col-lg-6" data-v-506de75b><h2 class="f40 f2 f500 line12" data-v-506de75b>Buy it with</h2></div><div class="col-lg-6" data-v-506de75b></div></div></div>',1)),m.goodsList&&m.goodsList.length>0?(t(),r("div",Me,[o(b(Te),{modules:w.value,"slides-per-view":1.5,"space-between":10,breakpoints:k,loop:!0,pagination:{clickable:!0},navigation:!0},{default:u(()=>[(t(!0),r(T,null,M(m.goodsList,(n,j)=>(t(),x(b(Re),{key:j},{default:u(()=>[e("div",Ne,[e("div",Oe,[e("div",{class:"imgHover",onClick:S=>_("/product/"+n.tag)},[o(P,{"img-class":"img1",src:n.listPicUrl,variant:"card"},null,8,["src"]),n.listPicUrl2!==null&&n.listPicUrl2!==""?(t(),x(P,{key:0,"img-class":"img2",src:n.listPicUrl2,variant:"card"},null,8,["src"])):g("",!0)],8,He),o(N,{type:"primary",round:"",onClick:S=>b(f).openItemCard(n.tag)},{default:u(()=>l[0]||(l[0]=[q("Add to cart")])),_:2},1032,["onClick"])]),n.goodsSkuImageList&&n.goodsSkuImageList.length>0?(t(),r("div",qe,[(t(!0),r(T,null,M(n.goodsSkuImageList.slice(0,9),(S,H)=>(t(),r("div",{class:Q(["img",S.key===n.tag?"on":""]),key:H,onClick:v=>_("/product/"+S.key)},[o(P,{src:S.value,variant:"thumb"},null,8,["src"])],10,je))),128))])):g("",!0),e("div",{class:"txtOh",onClick:S=>_("/product/"+n.tag)},[o(c,{"model-value":n.currentreviewLever,disabled:"","show-score":"","allow-half":"",size:"large","text-color":"#000","score-template":`(${parseFloat(n.currentreviewLever).toFixed(1)})`},null,8,["model-value","score-template"]),e("div",Ke,L(n.skugoodsName),1),n.goodsBrief?(t(),r("div",Je,L(n.goodsBrief),1)):g("",!0),e("div",We,[n.marketPrice!==n.retailPrice?(t(),x(C,{key:0,tag:"del"},{default:u(()=>[q(L(b(Y).priceSymbol)+L(n.marketPrice),1)]),_:2},1024)):g("",!0),e("span",null,L(b(Y).priceSymbol)+L(n.retailPrice),1)])],8,Ge)])]),_:2},1024))),128))]),_:1},8,["modules"])])):g("",!0),o(Ve)])}}}),Qe=K(Ye,[["__scopeId","data-v-506de75b"]]),Xe={class:"container"},Ze={class:"desc_li"},et=["innerHTML"],tt=G({__name:"desc",props:{descInfo:{type:Object,default:{}}},setup(m){const i=A(!1),w=()=>{i.value=!i.value,i.value||ke(()=>{const f=document.querySelector(".more");if(f){f.scrollIntoView({behavior:"smooth"});const k=window.innerHeight*.5,_=f.getBoundingClientRect();window.scrollBy({top:_.top-k,behavior:"smooth"})}})};return(f,k)=>{const _=X;return m.descInfo.goodsDesc?(t(),r("div",{key:0,class:Q(["item_desc",i.value?"show":""])},[e("div",Xe,[e("div",Ze,[e("div",{innerHTML:m.descInfo.goodsDesc},null,8,et)]),e("div",{class:Q(["more",i.value?"show":""])},[o(_,{size:"large",type:"primary",onClick:w,round:""},{default:u(()=>[q(L(i.value?"Fold Up":"Read More"),1)]),_:1})],2)])],2)):g("",!0)}}}),ot=K(tt,[["__scopeId","data-v-3822794f"]]),st={class:"cate_faq"},at={class:"container"},lt={key:0,class:"f3 f48 f500 text-center line12"},nt={key:1,class:"h_txt text-center mt-1"},rt={key:2,class:"faq_list mt-3"},it={class:"row justify-content-center"},ct={class:"col-lg-10"},dt=["innerHTML"],ut=G({__name:"faq",props:{infoArray:{type:Object,default:{}}},setup(m){var E;const i=m,{ulTitle:w,ulDesc:f,descSections:k}=ze((E=i.infoArray)==null?void 0:E.extraDesc3),_=A([0]);return(l,P)=>{const N=ne,c=re;return t(),r("div",st,[e("div",at,[b(w)[0]?(t(),r("h2",lt,L(b(w)[0].innerHTML),1)):g("",!0),b(f)[0]?(t(),r("p",nt,L(b(f)[0].innerHTML),1)):g("",!0),b(k)&&b(k).length>
10?(t(),r("div",rt,[e("div",it,[e("div",ct,[o(c,{modelValue:_.value,"onUpdate:modelValue":P[0]||(P[0]=C=>_.value=C)},{default:u(()=>[(t(!0),r(T,null,M(b(k),(C,n)=>(t(),x(N,{title:C.title,name:n},{default:u(()=>[e("div",{innerHTML:C.answerHtml},null,8,dt)]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])])])])):g("",!0)])])}}}),mt=K(ut,[["__scopeId","data-v-5f41584e"]]);class _t{static async commentGoodList(i){return xe("/comment/list",i)}static async commentGoodPost(i){return Ae("/comment/post",i)}}const vt={key:0,class:"bgf8 pt-5 pb-5",id:"reviewsres"},pt={class:"container"},gt={class:"rev_cont"},ft={class:"review_list mt-3"},yt={class:"row justify-content-center"},ht={class:"col-lg-10"},kt={class:"tit_img"},wt={class:"img"},It={class:"tit"},bt={class:"tit_name f3 f16"},Lt={key:0,class:"tit_rate"},xt={class:"cont_txt"},At={key:0,class:"cont fc66"},Ct={key:1,class:"pic mt-1"},$t={class:"tit_time"},Pt={class:"d-flex justify-content-center mt-2"},St=G({__name:"review",props:{infoArray:{type:Object,default:{}},commentArray:{type:Array,default:[]}},setup(m){const i=m,w=A(1),f=A(5),k=A(!1),_=A(),E=A(!1),l=ee({email:"",nickname:"",type:0,imgArray:[],goodsList:[{skuId:"",goodsLevel:0,pics:[],comment:""}]}),P=ee({nickname:[{required:!0,message:"Please Input Name",trigger:["blur","change"]}],goodsList:[{goodsLevel:[{required:!0,message:"Please Select Level",trigger:["blur","change"]}],comment:[{required:!0,message:"Please Input Comment",trigger:["blur","change"]}]}]}),N=we(()=>{const v=(w.value-1)*f.value,s=v+f.value;return i.commentArray.slice(v,s)}),c=v=>{var s;w.value=v,(s=document.getElementById("reviewsres"))==null||s.scrollIntoView({behavior:"smooth"})},C=()=>{k.value=!0,console.log("writeReview:",i.infoArray)},n=async v=>{if(v)try{if(await v.validate()){l.goodsList[0].skuId=i.infoArray.id,l.goodsList[0].pics=l.imgArray.map(I=>I.response.data),E.value=!0;try{const{data:I}=await _t.commentGoodPost(l);console.log("res:",I),I.success?(W.success("Review submitted successfully"),v.resetFields(),k.value=!1):W.error(I.msg)}catch(I){W.error("Failed to submit review"),console.error("Submit error:",I)}finally{E.value=!1}}}catch(s){console.log("Validation failed!",s)}},j=(v,s)=>{console.log("handleAvatarSuccess:",v)},S=v=>v.size/1024/1024>2?(W.error("Avatar picture size can not exceed 2MB!"),!1):!0,H=(v,s)=>{l.imgArray=s};return(v,s)=>{const I=oe,p=X,F=ae,z=ie,y=ce,D=Ie("Plus"),V=ve,B=_e,h=me,d=pe,$=ue,R=de;return m.commentArray&&m.commentArray.length>0?(t(),r("section",vt,[e("div",pt,[s[8]||(s[8]=e("h2",{class:"f2 f40 f500 text-center"},"Reviewsres",-1)),e("div",gt,[o(I,{"model-value":m.infoArray.currentreviewLever,disabled:"","show-score":"","allow-half":"",size:"large","text-color":"#000","score-template":`${parseFloat(m.infoArray.currentreviewLever).toFixed(1)} customer reviews`},null,8,["model-value","score-template"]),q(" | "+L(m.commentArray.length)+" Reviews ",1),o(p,{type:"primary",onClick:C,class:"ml-3"},{default:u(()=>s[7]||(s[7]=[q(" Write a review ")])),_:1})]),e("div",ft,[e("div",yt,[e("div",ht,[(t(!0),r(T,null,M(N.value,(a,O)=>(t(),r("div",{class:"review_li",key:O},[e("div",kt,[e("div",wt,L(a.nickname.substring(0,1)),1),e("div",It,[e("div",bt,[e("span",null,L(a.nickname),1),o(F,{src:`${b(Y).cdnBase}/product/review_icon.png`,width:"14"},null,8,["src"])]),a.evalLevel?(t(),r("div",Lt,[o(I,{class:"d-sm-none","model-value":a.evalLevel,disabled:"","allow-half":""},null,8,["model-value"])])):g("",!0)])]),e("div",xt,[a.content?(t(),r("div",At,L(a.content),1)):g("",!0),a.commentPictureEntityList&&a.commentPictureEntityList.length>0?(t(),r("div",Ct,[(t(!0),r(T,null,M(a.commentPictureEntityList,(U,J)=>(t(),x(z,{key:J,style:{width:"100px",height:"100px"},src:U.picUrl,"zoom-rate":1.2,"max-scale":7,"min-scale":.2,"preview-src-list":a.commtiPic,"show-progress":"","initial-index":4,fit:"cover"},null,8,["src","preview-src-list"]))),128))])):g("",!0)]),e("div",$t,L(a.addTime),1)]))),128)),e("div",Pt,[o(y,{background:"","hide-on-single-page":!0,layout:"prev, pager, next","current-page":w.value,"onUpdate:currentPage":s[0]||(s[0]=a=>w.value=a),"page-size":f.value,total:m.commentArray.length,onCurrentChange:c},null,8,["current-page","page-size","total"])])])])])]),o(R,{modelValue:k.value,"onUpdate:modelValue":s[6]||(s[6]=a=>
1k.value=a),title:"Write Review",width:"800"},{default:u(()=>[o($,{ref_key:"ruleLoginRef",ref:_,model:l,rules:P,"label-position":"top"},{default:u(()=>[o(h,{label:"Images",prop:"fileList"},{default:u(()=>[o(B,{"file-list":l.imgArray,"onUpdate:fileList":s[1]||(s[1]=a=>l.imgArray=a),accept:"file",action:`${b(Y).apiBase}/upload/upload`,"list-type":"picture-card","on-success":j,"before-upload":S,"on-remove":H},{default:u(()=>[o(V,null,{default:u(()=>[o(D)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),o(h,{label:"Level",prop:"goodsList.goodsLevel"},{default:u(()=>[o(I,{modelValue:l.goodsList[0].goodsLevel,"onUpdate:modelValue":s[2]||(s[2]=a=>l.goodsList[0].goodsLevel=a)},null,8,["modelValue"])]),_:1}),o(h,{label:"Message",prop:"goodsList.comment"},{default:u(()=>[o(d,{modelValue:l.goodsList[0].comment,"onUpdate:modelValue":s[3]||(s[3]=a=>l.goodsList[0].comment=a),type:"textarea",placeholder:"Your Message"},null,8,["modelValue"])]),_:1}),o(h,{label:"Name",prop:"nickname"},{default:u(()=>[o(d,{modelValue:l.nickname,"onUpdate:modelValue":s[4]||(s[4]=a=>l.nickname=a),placeholder:"Your Name"},null,8,["modelValue"])]),_:1}),o(p,{type:"primary",onClick:s[5]||(s[5]=a=>n(_.value))},{default:u(()=>s[9]||(s[9]=[q("Submit")])),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])):g("",!0)}}}),Vt=K(St,[["__scopeId","data-v-17b23e61"]]),Et={class:"page_item"},Ft={class:"item_top pb-5"},Bt={class:"container"},Ut={class:"row"},Rt={class:"col-lg-6"},Tt={class:"col-lg-6 txtPaddingL2"},zt=G({__name:"index",async setup(m){var S,H,v,s,I;let i,w;const f=se(),{params:k}=f.currentRoute.value,_=String(k.goodId);function E(p){const F={};return[...new Set(p.flatMap(y=>
1y.keyValue[0].value))].forEach(y=>{var B;const D=y.toLowerCase(),V=p.filter(h=>{var d;return((d=h.keyValue[0])==null?void 0:d.value)===y});if(V.length>0){const h=V[0];F[D]={style:((B=h.keyValue[0])==null?void 0:B.value.toLowerCase())||"",img:h.listPicUrl,tag:h.tag,bundle:{}},V.forEach(d=>{var R;const $=((R=d.keyValue[1])==null?void 0:R.value.toLowerCase())||"";$&&(F[D].bundle[$]={marketPrice:d.marketPrice||"",retailPrice:d.retailPrice||0})})}}),F}const l=([i,w]=be(async()=>$e(`product-${_}`,async()=>{var B,h;const[p,F]=await Promise.all([te.goodsdetail({goodsId:_}),te.goodsotherDetail({goodsId:_})]),z=p.data,y=(B=F.data)==null?void 0:B.data;if(!z.success)return{goodItemAll:{},goodItemCardSpec:{},goodItemCardInfo:null,goodItemOther:null};const V=[...((h=z.data.info)==null?void 0:h.goodsSkuEntityList.filter(d=>d.keyValue))||[]].sort((d,$)=>{var O,U,J,Z;if(((O=d.keyValue[0])==null?void 0:O.value)<((U=$.keyValue[0])==null?void 0:U.value))return-1;if(((J=d.keyValue[0])==null?void 0:J.value)>((Z=$.keyValue[0])==null?void 0:Z.value))return 1;const R=parseInt(d.keyValue[1]?d.keyValue[1].value:0),a=parseInt($.keyValue[1]?$.keyValue[1].value:0);return R-a});return{goodItemAll:z.data.info,goodItemCardSpec:E(V),goodItemCardInfo:V.find(d=>d.tag===_)??null,goodItemOther:y??null}})),i=await i,w(),i),P=A(((S=l.value)==null?void 0:S.goodItemAll)??{}),N=A(((H=l.value)==null?void 0:H.goodItemCardSpec)??{}),c=A((v=l.value)==null?void 0:v.goodItemCardInfo),C=A((s=l.value)==null?void 0:s.goodItemOther);(I=l.value)!=null&&I.goodItemOther||f.push("/sale");const n=p=>{c.value=P.value.goodsSkuEntityList.find(F=>F.tag===p)},j=p=>{p&&Ce({event:"view_item",ecommerce:{currency:"USD",value:p.retailPrice,items:[{item_id:p.goodsId,item_name:p.skugoodsName,price:p.retailPrice,item_brand:p.keyValueJson,item_category:p.skuSn}]}})};return c.value&&j(c.value),(p,F)=>{var V,B,h,d,$,R,a,O;const z=ye,y=ge,D=fe;return t(),r(T,null,[o(Pe),e("section",Et,[c.value?(t(),x(z,{key:0,items:[c.value.skugoodsName]},null,8,["items"])):g("",!0),e("div",Ft,[e("div",Bt,[e("div",Ut,[e("div",Rt,[(V=c.value)!=null&&V.attachmentEntityList?(t(),x(Ee,{key:(B=c.value)==null?void 0:B.tag,imageArray:(h=c.value)==null?void 0:h.attachmentEntityList},null,8,["imageArray"])):(t(),x(D,{key:1,animated:""},{template:u(()=>[o(y,{variant:"image",style:{width:"100%",height:"500px","margin-top":"1rem"}})]),_:1}))]),e("div",Tt,[(d=c.value)!=null&&d.skugoodsName?(t(),x(Fe,{key:0,infoArray:c.value,specArray:N.value,onOnSubmit:n},null,8,["infoArray","specArray"])):(t(),x(D,{key:1,animated:""},{template:u(()=>[e("p",null,[o(y,{variant:"h3",style:{height:"30px","margin-top":"1rem"}})]),e("p",null,[o(y,{variant:"h1",style:{width:"30%",height:"40px",margin:"10px 0"}})]),e("p",null,[o(y,{variant:"h3",style:{width:"30%",height:"30px",margin:"10px 0"}})]),e("p",null,[(t(),r(T,null,M(3,U=>o(y,{key:U,variant:"text",style:{width:"50%",height:"20px"}})),64))]),e("p",null,[(t(),r(T,null,M(3,U=>o(y,{key:U,variant:"text",style:{width:"25%",height:"20px"}})),64))]),e("p",null,[(t(),r(T,null,M(5,U=>o(y,{key:U,variant:"text",style:{height:"20px"}})),64))])]),_:1}))])])])]),($=c.value)!=null&&$.goodsSkuInfo?(t(),x(ot,{key:1,descInfo:(R=c.value)==null?void 0:R.goodsSkuInfo,class:"bgf2"},null,8,["descInfo"])):g("",!0),c.value?(t(),x(Qe,{key:2,goodsList:(a=c.value)==null?void 0:a.similarGoodsList,class:"pt-5 pb-5"},null,8,["goodsList"])):g("",!0),C.value&&C.value.category?(t(),x(mt,{key:3,infoArray:C.value.category,class:"bgf2 pt-5 pb-5"},null,8,["infoArray"])):g("",!0),o(Vt,{infoArray:c.value,commentArray:(O=P.value)==null?void 0:O.hotCommentList,class:"pt-5 pb-5"},null,8,["infoArray","commentArray"])]),o(Se)],64)}}}),Qt=K(zt,[["__scopeId","data-v-613b9021"]]);export{Qt 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.