-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path27ce892.modern.js
More file actions
1 lines (1 loc) · 10.2 KB
/
Copy path27ce892.modern.js
File metadata and controls
1 lines (1 loc) · 10.2 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[157,119,153],{194:function(t,e,o){"use strict";function r(t){const e=[],o=[];let r=!1;return Object.values(t.conteudo.personalizacoes).length?(t.conteudo.personalizacoes.forEach(t=>{if("s"===t.obrigatorio){t.valores.some(t=>t.selecionado)?o.push(!0):e.push(t)}else o.push(!0)}),o.length===Object.values(t.conteudo.personalizacoes).length&&(r=!0)):r=!0,{error:!r,personalizacoesInvalida:e}}function n(t){let e=!0;return t.conteudo.atributos.simples&&(e=t.conteudo.atributos.simples.valores.some(t=>t.selecionado)),{error:!e,atributoSimples:t.conteudo.atributos.simples}}function d(t){let e=t.path;if(t.query&&Object.keys(t.query).length>0){e+=`?${Object.entries(t.query).map(t=>{let[e,o]=t;return`${encodeURIComponent(e)}=${encodeURIComponent(o)}`}).join("&")}`}return e}function c(data){const t=data.conteudo.atributos.simples.valores.find(t=>t.selecionado);t&&(data.conteudo.carrinho=t.carrinho)}function l(){}o.r(e),o.d(e,"validaPersonalizacao",function(){return r}),o.d(e,"validaAtributoSimples",function(){return n}),o.d(e,"getFullLink",function(){return d}),o.d(e,"updateCartInfo",function(){return c}),o.d(e,"default",function(){return l})},204:function(t,e,o){var content=o(217);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(11).default)("2413e1da",content,!0,{sourceMap:!1})},205:function(t,e,o){var content=o(219);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(11).default)("b6583aea",content,!0,{sourceMap:!1})},216:function(t,e,o){"use strict";o(204)},217:function(t,e,o){var r=o(10)(function(i){return i[1]});r.push([t.i,"#container_page_detail[data-v-9c923de4]{width:100%}.boxSuperiorDetalhe[data-v-9c923de4]{margin-bottom:70px}#compreJunto[data-v-9c923de4]{margin:0 0 100px}.btAssinar[data-v-9c923de4]{align-items:center;border:1px solid #7c7c7c;color:#7c7c7c;display:flex;font-size:14px;height:40px;justify-content:center;margin-top:10px;width:100%}.avaliacoesProduto[data-v-9c923de4]{margin-top:40px}",""]),r.locals={},t.exports=r},218:function(t,e,o){"use strict";o(205)},219:function(t,e,o){var r=o(10)(function(i){return i[1]});r.push([t.i,"#container_page_detail #showcase_section.section{margin:12px 0 0}#buy_together{padding-bottom:35px;position:relative}#buy_together .section_title{margin:initial}#buy_together .container{margin-top:40px}.popupResultado .calcFrete-resultado-popContainer{min-width:600px}#buy_together .cardProdutoCombinacao-tentativaInvalida,#buy_together .cardProdutoPrincipal-tentativaInvalida{border:1px solid red}#application .related_history_products .section_header{display:flex;gap:16px;justify-content:center}.related_history_products .section_header .section_title{color:var(--text_base);cursor:pointer;font-size:var(--font_size_heading);font-weight:var(--font_weight_regular)}.related_history_products .section_header .section_title:after{display:none}.related_history_products .section_header .section_title.active{color:var(--primary_color);font-weight:var(--font_weight_semi_bold);-webkit-text-decoration:underline;text-decoration:underline}@media (max-width:1024px){.related_history_products .section_header .section_title{font-size:var(--font_size_big)}}@media (max-width:380px){.related_history_products .section_header .section_title{font-size:var(--font_size_base)}}.descAdicional .wheyT1{color:#333;font-size:24px;margin-bottom:10px}.descAdicional p{color:#666;font-size:16px;line-height:1.5}.descAdicional .container{margin:0 auto;max-width:600px}.descAdicional .product-image{margin-bottom:20px;text-align:center}.descAdicional .product-image img{height:auto;max-width:100%}.descAdicional .product-details{background-color:#f5f5f5;border-radius:5px;padding:20px}.descAdicional .product-price{color:#333;font-size:20px;margin-bottom:10px}.descAdicional .product-description{margin-bottom:10px}.descAdicional .product-features ul{list-style-type:disc;margin-bottom:10px;margin-left:20px}.descAdicional .product-features li{color:#666}",""]),r.locals={},t.exports=r},400:function(t,e,o){"use strict";o.r(e);var r={components:{description:()=>o.e(26).then(o.bind(null,829)),buyTogether:()=>o.e(25).then(o.bind(null,856)),showcase:()=>o.e(4).then(o.bind(null,793)),productRating:()=>o.e(27).then(o.bind(null,833))},data:()=>({liberar:!1,aggregateProducts:null,relatedProduct:{vitrine:{nivel:"geral",titulo:"Produtos Relacionados",tagTitulo:"h2"},produtos:[]},historyProducts:{vitrine:{nivel:"geral",titulo:"Produtos Visualizados",tagTitulo:"h2"},produtos:[]},showHistory:!1}),computed:{dataProd(){return this.$store.state.detalhe.dataProd},prodInfo(){return this.$store.state.detalhe.prodInfo}},beforeDestroy(){this.status=null,this.$store.commit("detalhe/setLimiteQuantidade",0)},mounted(){this.$store.state.loadInicial&&(this.liberar=!0),this.$store.state.loadInicial&&this.getPop(),window.addEventListener("load",()=>{this.liberar=!0,this.getPop()}),console.log("%c this.dataProd: ","margin-top: 6px; color: #7fffd4;",JSON.parse(JSON.stringify(this.dataProd)))},methods:{getPop(){this.$axios.get("/v2/front/struct/popup/detail").then(t=>{this.$store.commit("popup/setDataPop",t.data)}).catch(()=>!1)},getAggregateProduct(t){if(!t)return[];this.$axios.request({method:"get",url:`/v2/front/showcase/products/produto-detalhe-indicados?productId=${t}`}).then(t=>{this.aggregateProducts=t.data}).catch(t=>{console.info("produto-indicados ",t.response.data.error)})},redirectCheckout(data){this.$store.commit("setMenuCart",data),0!==Object.keys(this.$store.state.user.vendaInterna).length||this.$store.state.user.vendaInterna.id||(window.location.href="https://www.vitaminasbrasil.com/demo/equipe/checkout/carrinho")}}},n=(o(216),o(218),o(12)),component=Object(n.a)(r,function(){var t,e,o=this,r=o._self._c;return r("main",[o.dataProd?[r("div",{staticClass:"boxSuperiorDetalhe",attrs:{id:"container_page_detail"}},[r("geralBreadcrumb",{attrs:{dataBreadcrumb:o.dataProd.estrutura.breadcrumb,showLastItem:!1}}),o._v(" "),r("produtoProduct-info",{attrs:{dataProd:o.dataProd,prodInfo:o.prodInfo,containerLerMais:o.$refs.xablau,attrSimplesExposto:!0,attrSelect:!0},scopedSlots:o._u([(null===(t=o.aggregateProducts)||void 0===t||null===(e=t.produtos)||void 0===e?void 0:e.length)>0?{key:"relatedProduct",fn:function(){return[r("produtoInfosAggregate-product",{attrs:{vitrineData:o.aggregateProducts,qtdProdsToShow:12}})]},proxy:!0}:null],null,!0)}),o._v(" "),r("description",{attrs:{dataProd:o.dataProd,liberar:o.liberar}}),o._v(" "),o.dataProd.conteudo.combinacoes&&Object.keys(o.dataProd.conteudo.combinacoes).length?r("buyTogether",{attrs:{id:"buy_together",prodInfo:o.dataProd.conteudo,tagDesconto:!1,freteGratis:!0,btTrocarCombincao:!0,tituloCompreJunto:!0,isCarrinhoLateral:!0},on:{updatedCarrinhoLateral:function(t){return o.$store.commit("carrinho/toggleCarrinho",!0)}}}):o._e(),o._v(" "),r("productRating",{attrs:{product:o.dataProd.conteudo}})],1),o._v(" "),r("showcase",{staticClass:"related_history_products",class:o.showHistory?"history_product":"related_product",attrs:{showcaseHash:o.showHistory?"history-product":"related-product"},scopedSlots:o._u([{key:"titulo",fn:function(){return[r("h2",{staticClass:"section_title",class:{active:!o.showHistory},on:{click:function(t){o.showHistory=!1}}},[o._v("\n PRODUTOS RELACIONADOS\n ")]),o._v(" "),r("h2",{staticClass:"section_title",class:{active:o.showHistory},on:{click:function(t){o.showHistory=!0}}},[o._v("\n PRODUTOS VISUALIZADOS\n ")])]},proxy:!0}],null,!1,1199807486)}),o._v(" "),r("geralExternal-user-reviews")]:o._e()],2)},[],!1,null,"9c923de4",null);e.default=component.exports},764:function(t,e,o){"use strict";o.r(e);var r=o(194);async function n(t,e,o,n){const d="product/listing/landing-page"===n;let c=d?12:18;if("product/detail"!==n){c=e.query.ipp?e.query.ipp:c,o.commit("categoria/changeLimit",c);try{await t.$requestDataListagem(e,d?"landing-page":"category")}catch{o.commit("categoria/toggleLoadProds",!1)}}const l=`/v2/front/url/product/detail?url=${e.fullPath.replace("?","&")}`;"product/detail"===n&&await Promise.all([t.$axios.get(l).then(t=>{const data=t.data;data.conteudo.atributos.simples&&!data.conteudo.carrinho.length&&Object(r.updateCartInfo)(data),o.commit("setDadosPageAtual",data),o.commit("detalhe/setLimiteQuantidade",data.conteudo.estoque),o.commit("detalhe/setDataProd",data),o.commit("detalhe/setProductInHistory",data.conteudo)}).catch(t=>{console.error("Erro ao carregar produto"),o.commit("detalhe/setDataProd",t.data)})])}var d={components:{produtoDetalhe:o(400).default},async beforeRouteUpdate(t,e,o){"product/detail"!==this.$store.state.detalhe.pageType&&t.name.includes("categoria")&&e.name.includes("categoria")&&(this.$store.commit("categoria/toggleLoadProds",!0),await n(this,t,this.$store,this.$store.state.detalhe.pageType)),o()},async asyncData(t){let{app:e,route:o,store:r,error:d}=t;r.commit("detalhe/setDataProd",null);const c=`/v2/front/url/verify?url=${o.path}`,l=await e.$axios.request({method:"get",url:c}).then(t=>t.data.nivel).catch(t=>{console.error(t.response.data.error)});if(l)return r.commit("detalhe/setPageType",l),o.path.includes("/lista/")||await n(e,o,r,l),{tipoPage:l};d({statusCode:404,message:"Página não encontrada"})},data:()=>({tipoPage:null}),computed:{tipoListagem(){return"product/listing/landing-page"===this.$store.state.detalhe.pageType?"landingPage":"categoria"},componentPage(){let t;return t="product/listing/landing-page"===this.$store.state.detalhe.pageType||this.$route.path.includes("/lista/")?this.$route.path.includes("/lista/")?"produtoLista-detalhe":"listagem":"product/detail"===this.$store.state.detalhe.pageType?"produtoDetalhe":"listagem",t},categoriaNv(){return this.$route.params.length>1&&!this.$route.path.includes("/lista/")}}},c=o(12),component=Object(c.a)(d,function(){var t=this,e=t._self._c;return t.categoriaNv&&t.$store.state.categoria.pageData?e("nuxt"):t.$store.state.categoria.pageData||t.tipoPage&&"product/detail"===t.tipoPage&&t.$store.state.dadosPageAtual||t.$route.path.includes("/lista/")?e(t.componentPage,{key:t.$store.state.dadosPageAtual?JSON.stringify(t.$store.state.dadosPageAtual.estrutura.breadcrumb):"lista",tag:"component",attrs:{tipoListagem:t.tipoListagem}}):t._e()},[],!1,null,"f80b3104",null);e.default=component.exports}}]);