PageSourceSearch

https://shumoff02.ru/_nuxt/WpbDCIWZ.js

js shumoff02.ru collected 2026-10-07 18:17:44 UTC 4,682 bytes, 1 lines download raw bytes

1import{n as V,b as E,q as b,_ as F}from"./QG_NbKMh.js";import{_ as R}from"./O1P2iFh_.js";import{l as j,b as q,O as U,m as x,H as z,M as s,P as a,Y as p,R as d,U as t,u as i,$ as I,Z as C,X as y,Q as v,W as m,V as g,a0 as G,a2 as H}from"./BhZucro0.js";import{n as Q}from"./Ct7atCA_.js";const Y={class:"breadcrumbs",itemscope:"",itemtype:"http://schema.org/BreadcrumbList"},Z={class:"breadcrumbs__item",itemprop:"itemListElement",itemscope:"",itemtype:"http://schema.org/ListItem"},A={class:"breadcrumbs__item",itemprop:"itemListElement",itemscope:"",itemtype:"http://schema.org/ListItem"},J={class:"compare"},W={key:0,class:"container text-center text-md-right"},X={key:1,class:"container compare__container"},K={class:"compare__wrap"},P={class:"d-flex gap-3 m-0"},tt=["onClick"],et={class:"compare__wrap"},ot={class:"d-flex justify-content-between"},st=["onClick"],at=["src"],nt={class:"mb-2 mb-md-3 fw-bold"},rt={key:0,class:"fw-bold pr-2 pr-lg-4 compare__aside"},lt={key:1,class:"d-flex compare__table"},ct={key:0,class:"mb-0 text-center fw-bold"},ut={key:1,class:"mb-0 text-center"},pt={key:2,class:"container text-center mt-3"},ft=j({__name:"index",async setup(dt){let _,D;const S=V(),c=E(),h=q(null),[{data:n,refresh:L}]=([_,D]=U(()=>Promise.all([b("/api/compareTable",{method:"POST",body:{domain:c.hostname==="localhost"?"d-shumoff.ru":c.hostname}},"$3ZvGg3BkTz"),b("/api/compare",{method:"POST",body:{domain:c.hostname==="localhost"?"d-shumoff.ru":c.hostname}},"$Jj3RzFjykr")])),_=await _,D(),_),$=async()=>{await b("/api/deleteCompare",{method:"POST",body:{domain:c.hostname==="localhost"?"d-shumoff.ru":c.hostname}},"$LcMGkvlucY"),await L(),S.loadCompareProducts()},M=async(l,e)=>{await b("/api/deleteItemCompare",{method:"POST",body:{domain:c.hostname==="localhost"?"d-shumoff.ru":c.hostname,productId:l,skuId:e}},"$fH1MQaquEM"),await L(),S.loadCompareProducts()},O=x(()=>n==null?void 0:n.value[0].productsData.filter(l=>l.categoryId===h.value)),B=x(()=>n==null?void 0:n.value.map(l=>({...l,productsData:l.productsData.filter(e=>e.categoryId===h.value&&e.value!==null)}))),N=x(()=>{var l;return(l=n==null?void 0:n.value[0])==null?void 0:l.productsData.filter((e,u,k)=>u===k.findIndex(f=>f.categoryId===e.categoryId))});return z(()=>{h.value=n.value[0].productsData[0].categoryId}),(l,e)=>{var f,T;const u=F,k=R;return s(),a("main",null,[p(k,{class:"pt-2 w-full"},{default:d(()=>[t("ul",Y,[t("li",Z,[p(u,{to:"/",itemprop:"item"},{default:d(()=>e[0]||(e[0]=[t("span",{itemprop:"name"},"Шумоff",-1)])),_:1}),e[1]||(e[1]=t("meta",{itemprop:"position",content:"1"},null,-1))]),t("li",A,[p(u,{to:"/compare",itemprop:"item"},{default:d(()=>e[2]||(e[2]=[t("span",{itemprop:"name"},"Сравнение товаров",-1)])),_:1}),e[3]||(e[3]=t("meta",{itemprop:"position",content:"2"},null,-1))])])]),_:1}),t("section",J,[e[7]||(e[7]=t("h1",{class:"title text-center"},"Сравнение товаров",-1)),(f=i(n))!=null&&f.length?(s(),a("div",W,[t("button",{onClick:I($,["prevent"]),class:"primary-color fw-bold mb-1 mb-md-4"},"Удалить все")])):C("",!0),(T=i(n))!=null&&T.length?(s(),a("div",X,[t("div",K,[t("ul",P,[(s(!0),a(y,null,v(i(N),(o,r)=>(s(),a("li",{key:r},[t("button",{onClick:I(w=>h.value=o.categoryId,["prevent"]),class:"btn btn-primary text-nowrap"},m(o.categoryTitle),9,tt)]))),128))])]),t("div",et,[t("table",null,[t("thead",null,[t("tr",null,[e[4]||(e[4]=t("td",{class:"primary-color fw-bold"},null,-1)),t("td",null,[t("div",ot,[(s(!0),a(y,null,v(i(O),(o,r)=>(s(),a("div",{class:"compare__head",key:r},[t("button",{onClick:I(w=>M(o.product,o.skuId),["prevent"]),class:"btn btn-close position-absolute primary-color fw-bold p-1 right-0 top-0"}," ✕ ",8,st),p(u,{to:o.url},{default:d(()=>[t("img",{src:o.productImage,alt:"productImage"},null,8,at)]),_:2},1032,["to"]),t("p",nt,[g(m(++r)+". ",1),p(u,{to:o.url},{default:d(()=>[g(m(o==null?void 0:o.productTitle),1)]),_:2},1032,["to"])])]))),128))])])])]),t("tbody",null,[(s(!0),a(y,null,v(i(B),o=>G((s(),a("tr",null,[o.productsData.length?(s(),a("td",rt,m(o==null?void 0:o.title),1)):C("",!0),o.hasDifferences?(s(),a("td",lt,[(s(!0),a(y,null,v(o==null?void 0:o.productsData,(r,w)=>(s(),a("div",{class:"compare__col",key:w},[o.code==="price"?(s(),a("p",ct,m(i(Q)(r==null?void 0:r.value)),1)):(s(),a("p",ut,m(r==null?void 0:r.value),1))]))),128))])):C("",!0)],512)),[[H,o.productsData.length]])),256))])])])])):(s(),a("div",pt,[t("p",null,[e[6]||(e[6]=g("Тут пока пусто, добавьте товары в сравнение, перейдите в ")),p(u,{class:"primary-color",to:"/materials"},{default:d(()=>e[5]||(e[5]=[g("каталог")])),_:1})])]))])])}}});
1export{ft 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.