"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[158],{3483:function(s,e,a){var c=a(7842),t=a(5544),n=a(118),r=a(758),o=a.n(r),i=a(6540),l=a(5234),h=a(9201),p=a(5414),d=a(9703),m=a(9674),x=a(9513),g=a(4848),u=function(s,e,a){return Math.min(Math.max(s,e),a)},j=function(s,e,a){return s+(e-s)*a},N=function(s){return 1-Math.pow(1-s,3)};function b(){var s=(0,d.wR)(),e=s.resolvedTheme,a=(0,i.useState)(667),c=(0,t.A)(a,2),r=c[0],b=c[1],f=(0,i.useState)(0),y=(0,t.A)(f,2),S=y[0],v=y[1],Y=(0,h.c)();(0,p.l)(e,{mode:"light"});var E=o().getCurrentInstance().router,k=E?E.params:void 0,w=k?k.id:"",P=l.zv.find(function(s){return s.id===w});(0,i.useEffect)(function(){try{var s=o().getSystemInfoSync();b(s.windowHeight)}catch(s){}},[]);var O=(0,i.useCallback)(function(s){var e=s.detail&&s.detail.scrollTop||0,a=1.2*r,c=u(e/a,0,1);v(c)},[r]),T=(0,i.useMemo)(function(){var s=S,e=0,a=0;if(s<=.4){var c=N(s/.4);e=j(0,32,c),a=j(0,38,c)}else if(s<=.55){var t=(s-.4)/.15;e=j(32,34,t),a=j(38,41,t)}else e=34,a=41;var n=0;n=s<=.4?0:s<=.7?j(0,-75,(s-.4)/.3):-75;var r=1;r=s<=.35?1:s<=.48?u(1-(s-.35)/.13,0,1):0;var o=0;o=s<=.55?0:s<=.7?(s-.55)/.15:1;var i=1,l=0;if(s<=.05)i=0,l=60;else if(s<=.22){var h=(s-.05)/.17;i=N(h),l=j(60,0,N(h))}var p=1;return s<=.15&&(p=u(1-s/.15,0,1)),{topCrop:e,bottomCrop:a,translateY:n,heroInfoOpacity:r,bandOpacity:o,contentOpacity:i,contentOffset:l,backBtnOpacity:p,visibleHeight:100-e-a}},[S]),B=(0,i.useMemo)(function(){return P?P.tone:[28,22,18]},[P]);return P?(0,g.jsxs)(n.Ss,{className:"shop-detail-page theme-dark",children:[(0,g.jsx)(m.A,{darkTop:!0}),(0,g.jsxs)(n.Ss,{className:"shop-hero-fixed",children:[(0,g.jsx)(n.Ss,{className:"shop-hero-clip",style:{height:"".concat(r*T.visibleHeight/100,"px"),overflow:"hidden",transform:"translateY(".concat(r*T.translateY/100,"px)")},children:(0,g.jsx)(n._V,{className:"shop-hero-img",src:P.images&&P.images[0]||P.iconImg||"",mode:"aspectFill",style:{width:"100%",height:"".concat(r,"px"),position:"absolute",top:"".concat(-r*T.topCrop/100,"px"),left:0}})}),(0,g.jsx)(n.Ss,{className:"shop-hero-overlay",style:{background:"linear-gradient(to bottom, rgba(".concat(B[0],", ").concat(B[1],", ").concat(B[2],", 0) 0%, rgba(").concat(B[0],", ").concat(B[1],", ").concat(B[2],", 0.55) 40%, rgba(").concat(B[0],", ").concat(B[1],", ").concat(B[2],", 0.95) 100%)")}}),(0,g.jsxs)(n.Ss,{className:"shop-hero-info",style:{opacity:T.heroInfoOpacity},children:[(0,g.jsx)(n.EY,{className:"shop-hero-title",children:P.name}),(0,g.jsx)(n.EY,{className:"shop-hero-subtitle",children:P.subtitle||P.desc}),(0,g.jsxs)(n.Ss,{className:"shop-hero-price-row",children:[(0,g.jsxs)(n.EY,{className:"shop-hero-price",children:["\xa5",P.price]}),P.originalPrice&&P.originalPrice>P.price&&(0,g.jsxs)(n.EY,{className:"shop-hero-original",children:["\xa5",P.originalPrice]})]})]})]}),(0,g.jsxs)(n.BM,{className:"shop-scroll",scrollY:!0,scrollEventThrottle:16,style:{height:"".concat(r,"px")},onScroll:O,children:[(0,g.jsx)(n.Ss,{style:{height:"".concat(.65*r,"px")}}),(0,g.jsxs)(n.Ss,{className:"shop-content",style:{backgroundColor:"rgb(".concat(B[0],", ").concat(B[1],", ").concat(B[2],")")},children:[(0,g.jsxs)(n.Ss,{className:"shop-band",style:{top:"".concat(Y.statusBarHeight,"px"),opacity:T.bandOpacity,backgroundColor:"rgba(".concat(B[0],", ").concat(B[1],", ").concat(B[2],", 0.88)"),backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},children:[(0,g.jsx)(n.EY,{className:"shop-band-title",children:P.name}),(0,g.jsx)(n.EY,{className:"shop-band-subtitle",children:P.subtitle||P.desc}),(0,g.jsxs)(n.Ss,{className:"shop-band-price-row",children:[(0,g.jsxs)(n.EY,{className:"shop-band-price",children:["\xa5",P.price]}),P.originalPrice&&P.originalPrice>P.price&&(0,g.jsxs)(n.EY,{className:"shop-band-original",children:["\xa5",P.originalPrice]})]})]}),(0,g.jsxs)(n.Ss,{className:"shop-detail-body",style:{opacity:T.contentOpacity,transform:"translateY(".concat(T.contentOffset,"px)")},children:[(0,g.jsxs)(n.Ss,{className:"shop-content-card",children:[P.story&&(0,g.jsxs)(n.Ss,{className:"shop-section",children:[(0,g.jsx)(n.EY,{className:"shop-section-title",children:"\u8bbe\u8ba1\u7406\u5ff5"}),(0,g.jsx)(n.EY,{className:"shop-section-text",children:P.story})]}),P.story&&P.scene&&(0,g.jsx)(n.Ss,{className:"shop-divider"}),P.scene&&(0,g.jsxs)(n.Ss,{className:"shop-section",children:[(0,g.jsx)(n.EY,{className:"shop-section-title",children:"\u4f7f\u7528\u573a\u666f"}),(0,g.jsx)(n.EY,{className:"shop-section-text",children:P.scene})]}),P.tags&&P.tags.length>0&&(0,g.jsx)(n.Ss,{className:"shop-section",children:(0,g.jsx)(n.Ss,{className:"shop-tag-row",children:P.tags.map(function(s){return(0,g.jsx)(n.Ss,{className:"shop-tag",children:(0,g.jsx)(n.EY,{className:"shop-tag-text",children:s})},s)})})}),(P.story||P.scene)&&P.tags&&P.tags.length>0&&(0,g.jsx)(n.Ss,{className:"shop-divider"}),(P.story||P.scene||P.tags&&P.tags.length>0)&&P.specs&&P.specs.length>0&&(0,g.jsx)(n.Ss,{className:"shop-divider"}),P.specs&&P.specs.length>0&&(0,g.jsxs)(n.Ss,{className:"shop-section",children:[(0,g.jsx)(n.EY,{className:"shop-section-title",children:"\u89c4\u683c\u53c2\u6570"}),(0,g.jsx)(n.Ss,{className:"shop-spec-table",children:P.specs.map(function(s){var e=(0,t.A)(s,2),a=e[0],c=e[1];return(0,g.jsxs)(n.Ss,{className:"shop-spec-row",children:[(0,g.jsx)(n.EY,{className:"shop-spec-key",children:a}),(0,g.jsx)(n.EY,{className:"shop-spec-val",children:c})]},a)})})]})]}),(0,g.jsx)(n.Ss,{className:"shop-bottom-spacer"})]})]})]},P.id),(0,g.jsx)(n.Ss,{className:"shop-back-btn",onTap:function(){return o().navigateBack()},style:{top:"".concat(Y.backBtnPaddingTop,"px"),opacity:T.backBtnOpacity},children:(0,g.jsx)(n.EY,{className:"shop-back-arrow",children:"\u2190"})}),(0,g.jsxs)(x.A,{children:[(0,g.jsxs)(n.Ss,{className:"price-summary",children:[(0,g.jsx)(n.EY,{className:"summary-label",children:"\u8d77\u4ef7"}),(0,g.jsxs)(n.EY,{className:"summary-price",children:["\xa5",P.price]}),P.originalPrice&&P.originalPrice>P.price&&(0,g.jsxs)(n.EY,{className:"summary-original",children:["\xa5",P.originalPrice]})]}),(0,g.jsx)(n.Ss,{className:"btn-secondary",onTap:function(){return o().navigateBack()},children:(0,g.jsx)(n.EY,{children:"\u8fd4\u56de"})}),(0,g.jsx)(n.Ss,{className:"btn-primary",onTap:function(){return o().navigateTo({url:"/pages/product/index?id=".concat(P.id)})},children:(0,g.jsx)(n.EY,{children:"\u7acb\u5373\u5b9a\u5236"})})]}),(0,g.jsx)(n.Ss,{className:"safe-bottom-placeholder"})]}):(0,g.jsxs)(n.Ss,{className:"shop-detail-page theme-dark",children:[(0,g.jsx)(m.A,{darkTop:!0}),(0,g.jsx)(n.EY,{style:{color:"#fff",padding:"40rpx"},children:"\u5546\u54c1\u4e0d\u5b58\u5728"})]})}var f={navigationStyle:"custom",enablePageMeta:!0,navigationBarTextStyle:"white"};Page((0,c.createPageConfig)(b,"pages/shop/detail/index",{root:{cn:[]}},f||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(3483)});s.O()}]);