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