diff --git a/dist/pages/product/index.js b/dist/pages/product/index.js index b2b27ff..b5c96e8 100644 --- a/dist/pages/product/index.js +++ b/dist/pages/product/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[612],{4120:function(s,e,a){var c=a(7842),r=a(5544),l=a(118),n=a(758),i=a.n(n),t=a(6540),d=a(5234),o=a(8594),m=a(9703),h=a(9201),x=a(5414),j=a(9674),p=a(3053),u=a(9513),N=a(4848);function S(){var s=(0,m.wR)(),e=(s.theme,s.resolvedTheme),a=(0,h.c)();(0,x.l)(e);var c=(0,t.useState)(!1),n=(0,r.A)(c,2),S=n[0],g=n[1],E=(0,t.useState)(1),Y=(0,r.A)(E,2),f=Y[0],v=Y[1],y=i().getCurrentInstance().router,b=y?y.params:void 0,k=b&&b.id?b.id:"",w=(0,d.y9)(k);if(!w)return(0,N.jsxs)(l.Ss,{className:"theme-".concat(e),children:[(0,N.jsx)(j.A,{}),(0,N.jsx)(p.A,{title:"\u5546\u54c1\u8be6\u60c5",targetSelector:".page-header",showBack:!0}),(0,N.jsx)(l.Ss,{className:"product-page",children:(0,N.jsx)(l.Ss,{className:"page-header",style:{marginTop:"".concat(a.statusBarHeight+12,"px")},children:(0,N.jsxs)(l.Ss,{className:"page-header-inner",children:[(0,N.jsx)(l.Ss,{className:"back-btn",onTap:function(){return i().navigateBack()},children:(0,N.jsx)(l.EY,{className:"back-arrow",children:"\u2190"})}),(0,N.jsx)(l.EY,{className:"nav-title",children:"\u5546\u54c1\u672a\u627e\u5230"}),(0,N.jsx)(l.Ss,{className:"nav-placeholder"})]})})})]});var T=w.specs&&w.specs.length>0?w.specs.find(function(s){return s[0].indexOf("\u5de5\u827a")>=0}):void 0,A=T?T[1]:"\u6fc0\u5149\u5fae\u96d5",B=function(){v(1),g(!0)},q=function(){(0,o.cY)(w,f),g(!1),i().showToast({title:"\u5df2\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355 x".concat(f),icon:"success"}),setTimeout(function(){return i().navigateBack()},1200)},P=function(){i().navigateTo({url:"/pages/diy/index?source=product&productId=".concat(w.id,"&quantity=1")})},C=function(s){v(function(e){return Math.max(1,Math.min(99,e+s))})};return(0,N.jsxs)(l.Ss,{className:"theme-".concat(e),children:[(0,N.jsx)(j.A,{}),(0,N.jsx)(p.A,{title:"\u5546\u54c1\u8be6\u60c5",targetSelector:".page-header",showBack:!0}),(0,N.jsxs)(l.Ss,{className:"product-page",children:[(0,N.jsx)(l.Ss,{className:"page-header",style:{marginTop:"".concat(a.statusBarHeight+12,"px")},children:(0,N.jsxs)(l.Ss,{className:"page-header-inner",children:[(0,N.jsx)(l.Ss,{className:"back-btn",onTap:function(){return i().navigateBack()},children:(0,N.jsx)(l.EY,{className:"back-arrow",children:"\u2190"})}),(0,N.jsx)(l.EY,{className:"nav-title",children:"\u5546\u54c1\u8be6\u60c5"}),(0,N.jsx)(l.Ss,{className:"nav-placeholder"})]})}),(0,N.jsx)(l.Ss,{className:"hero-section",children:(0,N.jsx)(l.RC,{className:"hero-swiper",circular:!0,autoplay:!0,interval:3e3,duration:500,indicatorDots:!0,indicatorColor:"var(--border-strong)",indicatorActiveColor:"var(--accent-primary)",children:w.images&&w.images.length>0?w.images.map(function(s,e){return(0,N.jsx)(l.wu,{children:(0,N.jsx)(l.Ss,{className:"hero-block",children:(0,N.jsx)(l._V,{className:"hero-image",src:s,mode:"aspectFill"})})},e)}):(0,N.jsx)(l.wu,{children:(0,N.jsx)(l.Ss,{className:"hero-block hero-block-fallback",children:(0,N.jsx)(l._V,{className:"hero-fallback-icon",src:(0,d.QE)(w),mode:"aspectFit"})})})})}),(0,N.jsx)(l.Ss,{className:"detail-card surface-card",children:(0,N.jsxs)(l.Ss,{className:"price-line",children:[(0,N.jsxs)(l.Ss,{className:"price-left",children:[(0,N.jsx)(l.EY,{className:"detail-title",children:w.name}),(0,N.jsx)(l.EY,{className:"detail-desc",children:w.desc})]}),(0,N.jsxs)(l.Ss,{className:"price-right",children:[(0,N.jsxs)(l.EY,{className:"price",children:["\xa5",w.price]}),w.originalPrice&&w.originalPrice>w.price&&(0,N.jsxs)(l.EY,{className:"price-old",children:["\xa5",w.originalPrice]})]})]})}),(0,N.jsxs)(l.Ss,{className:"detail-card surface-card",children:[(0,N.jsxs)(l.Ss,{className:"spec-row",children:[(0,N.jsx)(l.EY,{className:"spec-key",children:"\u5355\u4ef7"}),(0,N.jsxs)(l.EY,{className:"spec-value",children:["\xa5",w.price]})]}),(0,N.jsxs)(l.Ss,{className:"spec-row",children:[(0,N.jsx)(l.EY,{className:"spec-key",children:"\u5de5\u671f"}),(0,N.jsx)(l.EY,{className:"spec-value",children:w.leadTime})]}),(0,N.jsxs)(l.Ss,{className:"spec-row",children:[(0,N.jsx)(l.EY,{className:"spec-key",children:"\u5c3a\u5bf8"}),(0,N.jsxs)(l.EY,{className:"spec-value",children:[w.mask.width," \xd7 ",w.mask.height," px"]})]}),(0,N.jsxs)(l.Ss,{className:"spec-row",children:[(0,N.jsx)(l.EY,{className:"spec-key",children:"\u5b9a\u5236\u5de5\u827a"}),(0,N.jsx)(l.EY,{className:"spec-value",children:A})]})]}),(0,N.jsxs)(l.Ss,{className:"detail-card surface-card",children:[(0,N.jsx)(l.EY,{className:"section-title",children:"\u5546\u54c1\u4ecb\u7ecd"}),(0,N.jsx)(l.EY,{className:"detail-text",children:w.description})]}),(0,N.jsxs)(u.A,{children:[(0,N.jsxs)(l.Ss,{className:"price-summary",children:[(0,N.jsx)(l.EY,{className:"summary-label",children:"\u8d77\u4ef7"}),(0,N.jsxs)(l.EY,{className:"summary-price",children:["\xa5",w.price]})]}),(0,N.jsx)(l.Ss,{className:"btn-secondary",onTap:B,children:(0,N.jsx)(l.EY,{children:"\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355"})}),(0,N.jsx)(l.Ss,{className:"btn-primary",onTap:P,children:(0,N.jsx)(l.EY,{children:"\u7acb\u5373\u4e0b\u5355"})})]}),S&&(0,N.jsx)(l.Ss,{className:"modal-overlay",children:(0,N.jsxs)(l.Ss,{className:"modal-card surface-card",children:[(0,N.jsx)(l.EY,{className:"modal-title",children:"\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355"}),(0,N.jsxs)(l.Ss,{className:"modal-product",children:[(0,N.jsx)(l._V,{className:"modal-icon-img",src:(0,d.QE)(w),mode:"aspectFit"}),(0,N.jsx)(l.EY,{className:"modal-name",children:w.name})]}),(0,N.jsxs)(l.Ss,{className:"quantity-row",children:[(0,N.jsx)(l.EY,{className:"qty-label",children:"\u6570\u91cf"}),(0,N.jsxs)(l.Ss,{className:"qty-control",children:[(0,N.jsx)(l.Ss,{className:"qty-btn",onTap:function(){return C(-1)},children:"\uff0d"}),(0,N.jsx)(l.EY,{className:"qty-num",children:f}),(0,N.jsx)(l.Ss,{className:"qty-btn",onTap:function(){return C(1)},children:"\uff0b"})]})]}),(0,N.jsxs)(l.Ss,{className:"modal-total",children:[(0,N.jsx)(l.EY,{className:"total-label",children:"\u5c0f\u8ba1"}),(0,N.jsxs)(l.EY,{className:"total-price",children:["\xa5",(w.price*f).toFixed(2)]})]}),(0,N.jsxs)(l.Ss,{className:"modal-actions",children:[(0,N.jsx)(l.Ss,{className:"btn-secondary",onTap:function(){return g(!1)},children:(0,N.jsx)(l.EY,{children:"\u53d6\u6d88"})}),(0,N.jsx)(l.Ss,{className:"btn-primary",onTap:q,children:(0,N.jsx)(l.EY,{children:"\u786e\u5b9a"})})]})]})})]})]})}var g={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u5546\u54c1\u8be6\u60c5"};Page((0,c.createPageConfig)(S,"pages/product/index",{root:{cn:[]}},g||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(4120)});s.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[612],{4120:function(s,e,a){var c=a(7842),l=a(5544),r=a(118),n=a(758),i=a.n(n),t=a(6540),d=a(5234),o=a(8594),m=a(9703),h=a(9201),x=a(5414),p=a(9674),j=a(3053),u=a(9513),N=a(4848);function S(){var s=(0,m.wR)(),e=(s.theme,s.resolvedTheme),a=(0,h.c)();(0,x.l)(e);var c=(0,t.useState)(!1),n=(0,l.A)(c,2),S=n[0],g=n[1],f=(0,t.useState)(1),E=(0,l.A)(f,2),Y=E[0],v=E[1],y=i().getCurrentInstance().router,b=y?y.params:void 0,k=b&&b.id?b.id:"",w=(0,d.y9)(k);if(!w)return(0,N.jsxs)(r.Ss,{className:"theme-".concat(e),children:[(0,N.jsx)(p.A,{}),(0,N.jsx)(j.A,{title:"\u5546\u54c1\u8be6\u60c5",targetSelector:".page-header",showBack:!0}),(0,N.jsx)(r.Ss,{className:"product-page",children:(0,N.jsx)(r.Ss,{className:"page-header",style:{marginTop:"".concat(a.statusBarHeight+12,"px")},children:(0,N.jsxs)(r.Ss,{className:"page-header-inner",children:[(0,N.jsx)(r.Ss,{className:"back-btn",style:{position:"fixed",left:"30rpx",top:"".concat(a.menuButtonTop,"px"),zIndex:41},onTap:function(){return i().navigateBack()},children:(0,N.jsx)(r.EY,{className:"back-arrow",children:"\u2190"})}),(0,N.jsx)(r.Ss,{className:"nav-placeholder"}),(0,N.jsx)(r.EY,{className:"nav-title",children:"\u5546\u54c1\u672a\u627e\u5230"}),(0,N.jsx)(r.Ss,{className:"nav-placeholder"})]})})})]});var T=w.specs&&w.specs.length>0?w.specs.find(function(s){return s[0].indexOf("\u5de5\u827a")>=0}):void 0,B=T?T[1]:"\u6fc0\u5149\u5fae\u96d5",A=function(){v(1),g(!0)},q=function(){(0,o.cY)(w,Y),g(!1),i().showToast({title:"\u5df2\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355 x".concat(Y),icon:"success"}),setTimeout(function(){return i().navigateBack()},1200)},P=function(){i().navigateTo({url:"/pages/diy/index?source=product&productId=".concat(w.id,"&quantity=1")})},C=function(s){v(function(e){return Math.max(1,Math.min(99,e+s))})};return(0,N.jsxs)(r.Ss,{className:"theme-".concat(e),children:[(0,N.jsx)(p.A,{}),(0,N.jsx)(j.A,{title:"\u5546\u54c1\u8be6\u60c5",targetSelector:".page-header",showBack:!0}),(0,N.jsxs)(r.Ss,{className:"product-page",children:[(0,N.jsx)(r.Ss,{className:"page-header",style:{marginTop:"".concat(a.statusBarHeight+12,"px")},children:(0,N.jsxs)(r.Ss,{className:"page-header-inner",children:[(0,N.jsx)(r.Ss,{className:"back-btn",style:{position:"fixed",left:"30rpx",top:"".concat(a.menuButtonTop,"px"),zIndex:41},onTap:function(){return i().navigateBack()},children:(0,N.jsx)(r.EY,{className:"back-arrow",children:"\u2190"})}),(0,N.jsx)(r.Ss,{className:"nav-placeholder"}),(0,N.jsx)(r.EY,{className:"nav-title",children:"\u5546\u54c1\u8be6\u60c5"}),(0,N.jsx)(r.Ss,{className:"nav-placeholder"})]})}),(0,N.jsx)(r.Ss,{className:"hero-section",children:(0,N.jsx)(r.RC,{className:"hero-swiper",circular:!0,autoplay:!0,interval:3e3,duration:500,indicatorDots:!0,indicatorColor:"var(--border-strong)",indicatorActiveColor:"var(--accent-primary)",children:w.images&&w.images.length>0?w.images.map(function(s,e){return(0,N.jsx)(r.wu,{children:(0,N.jsx)(r.Ss,{className:"hero-block",children:(0,N.jsx)(r._V,{className:"hero-image",src:s,mode:"aspectFill"})})},e)}):(0,N.jsx)(r.wu,{children:(0,N.jsx)(r.Ss,{className:"hero-block hero-block-fallback",children:(0,N.jsx)(r._V,{className:"hero-fallback-icon",src:(0,d.QE)(w),mode:"aspectFit"})})})})}),(0,N.jsx)(r.Ss,{className:"detail-card surface-card",children:(0,N.jsxs)(r.Ss,{className:"price-line",children:[(0,N.jsxs)(r.Ss,{className:"price-left",children:[(0,N.jsx)(r.EY,{className:"detail-title",children:w.name}),(0,N.jsx)(r.EY,{className:"detail-desc",children:w.desc})]}),(0,N.jsxs)(r.Ss,{className:"price-right",children:[(0,N.jsxs)(r.EY,{className:"price",children:["\xa5",w.price]}),w.originalPrice&&w.originalPrice>w.price&&(0,N.jsxs)(r.EY,{className:"price-old",children:["\xa5",w.originalPrice]})]})]})}),(0,N.jsxs)(r.Ss,{className:"detail-card surface-card",children:[(0,N.jsxs)(r.Ss,{className:"spec-row",children:[(0,N.jsx)(r.EY,{className:"spec-key",children:"\u5355\u4ef7"}),(0,N.jsxs)(r.EY,{className:"spec-value",children:["\xa5",w.price]})]}),(0,N.jsxs)(r.Ss,{className:"spec-row",children:[(0,N.jsx)(r.EY,{className:"spec-key",children:"\u5de5\u671f"}),(0,N.jsx)(r.EY,{className:"spec-value",children:w.leadTime})]}),(0,N.jsxs)(r.Ss,{className:"spec-row",children:[(0,N.jsx)(r.EY,{className:"spec-key",children:"\u5c3a\u5bf8"}),(0,N.jsxs)(r.EY,{className:"spec-value",children:[w.mask.width," \xd7 ",w.mask.height," px"]})]}),(0,N.jsxs)(r.Ss,{className:"spec-row",children:[(0,N.jsx)(r.EY,{className:"spec-key",children:"\u5b9a\u5236\u5de5\u827a"}),(0,N.jsx)(r.EY,{className:"spec-value",children:B})]})]}),(0,N.jsxs)(r.Ss,{className:"detail-card surface-card",children:[(0,N.jsx)(r.EY,{className:"section-title",children:"\u5546\u54c1\u4ecb\u7ecd"}),(0,N.jsx)(r.EY,{className:"detail-text",children:w.description})]}),(0,N.jsxs)(u.A,{children:[(0,N.jsxs)(r.Ss,{className:"price-summary",children:[(0,N.jsx)(r.EY,{className:"summary-label",children:"\u8d77\u4ef7"}),(0,N.jsxs)(r.EY,{className:"summary-price",children:["\xa5",w.price]})]}),(0,N.jsx)(r.Ss,{className:"btn-secondary",onTap:A,children:(0,N.jsx)(r.EY,{children:"\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355"})}),(0,N.jsx)(r.Ss,{className:"btn-primary",onTap:P,children:(0,N.jsx)(r.EY,{children:"\u7acb\u5373\u4e0b\u5355"})})]}),S&&(0,N.jsx)(r.Ss,{className:"modal-overlay",children:(0,N.jsxs)(r.Ss,{className:"modal-card surface-card",children:[(0,N.jsx)(r.EY,{className:"modal-title",children:"\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355"}),(0,N.jsxs)(r.Ss,{className:"modal-product",children:[(0,N.jsx)(r._V,{className:"modal-icon-img",src:(0,d.QE)(w),mode:"aspectFit"}),(0,N.jsx)(r.EY,{className:"modal-name",children:w.name})]}),(0,N.jsxs)(r.Ss,{className:"quantity-row",children:[(0,N.jsx)(r.EY,{className:"qty-label",children:"\u6570\u91cf"}),(0,N.jsxs)(r.Ss,{className:"qty-control",children:[(0,N.jsx)(r.Ss,{className:"qty-btn",onTap:function(){return C(-1)},children:"\uff0d"}),(0,N.jsx)(r.EY,{className:"qty-num",children:Y}),(0,N.jsx)(r.Ss,{className:"qty-btn",onTap:function(){return C(1)},children:"\uff0b"})]})]}),(0,N.jsxs)(r.Ss,{className:"modal-total",children:[(0,N.jsx)(r.EY,{className:"total-label",children:"\u5c0f\u8ba1"}),(0,N.jsxs)(r.EY,{className:"total-price",children:["\xa5",(w.price*Y).toFixed(2)]})]}),(0,N.jsxs)(r.Ss,{className:"modal-actions",children:[(0,N.jsx)(r.Ss,{className:"btn-secondary",onTap:function(){return g(!1)},children:(0,N.jsx)(r.EY,{children:"\u53d6\u6d88"})}),(0,N.jsx)(r.Ss,{className:"btn-primary",onTap:q,children:(0,N.jsx)(r.EY,{children:"\u786e\u5b9a"})})]})]})})]})]})}var g={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u5546\u54c1\u8be6\u60c5"};Page((0,c.createPageConfig)(S,"pages/product/index",{root:{cn:[]}},g||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(4120)});s.O()}]); \ No newline at end of file diff --git a/dist/pages/product/index.wxss b/dist/pages/product/index.wxss index d83339e..4df41d0 100644 --- a/dist/pages/product/index.wxss +++ b/dist/pages/product/index.wxss @@ -1 +1 @@ -.product-page{padding:0 32rpx 512rpx}.page-header{margin-bottom:24rpx;padding:0 24rpx 24rpx;position:relative;z-index:10}.page-header-inner{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;min-height:88rpx}.back-btn{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-card);border:1rpx solid var(--border-strong);border-radius:50%;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;height:80rpx;-webkit-justify-content:center;justify-content:center;width:80rpx}.back-btn:active{-webkit-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.back-arrow{color:var(--text-primary);font-size:44rpx;font-weight:600;line-height:1}.nav-title{color:var(--text-primary);-webkit-flex:1;-ms-flex:1;flex:1;font-size:34rpx;font-weight:600;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.nav-placeholder{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:80rpx}.hero-section{width:100%}.hero-swiper{height:560rpx}.hero-block{background:var(--bg-muted);border-radius:24rpx;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);height:100%;overflow:hidden;position:relative}.hero-image{height:100%;width:100%}.hero-block-fallback{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:-webkit-linear-gradient(290deg,var(--accent-primary-strong),var(--accent-secondary));background:linear-gradient(160deg,var(--accent-primary-strong),var(--accent-secondary));display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.hero-fallback-icon{height:140rpx;margin-bottom:24rpx;width:140rpx}.detail-card{margin-top:24rpx;padding:32rpx}.price-line{-ms-flex-align:end;-ms-flex-pack:justify;-webkit-align-items:flex-end;align-items:flex-end;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx;-webkit-justify-content:space-between;justify-content:space-between}.price-left{-webkit-flex:1;-ms-flex:1;flex:1;min-width:0}.detail-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;line-height:1.3}.detail-desc{color:var(--text-secondary);display:block;font-size:24rpx;line-height:1.4;margin-top:8rpx}.price-right{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;text-align:right}.price{color:var(--accent-primary);display:block;font-size:40rpx;font-variant-numeric:tabular-nums;font-weight:800;line-height:1.2}.price-old{color:var(--text-muted);display:block;font-size:24rpx;font-variant-numeric:tabular-nums;margin-top:6rpx;text-decoration:line-through}.spec-row{-ms-flex-align:start;-ms-flex-pack:justify;-webkit-align-items:flex-start;align-items:flex-start;border-bottom:1rpx solid var(--border);display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx;-webkit-justify-content:space-between;justify-content:space-between;padding:24rpx 0}.spec-row:last-child{border-bottom:none;padding-bottom:0}.spec-key{color:var(--text-secondary);-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:26rpx}.spec-value{color:var(--text-primary);-webkit-flex:1;-ms-flex:1;flex:1;font-size:26rpx;font-weight:600;text-align:right;word-break:break-all}.detail-card .section-title{font-size:32rpx;font-weight:700;margin-bottom:24rpx}.detail-text{color:var(--text-secondary);display:block;font-size:28rpx;line-height:1.8}.bottom-action-bar{gap:20rpx;padding-left:32rpx;padding-right:32rpx}.bottom-action-bar .price-summary{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0}.summary-label{color:var(--text-secondary);display:block;font-size:22rpx}.summary-price{color:var(--accent-primary);display:block;font-size:36rpx;font-variant-numeric:tabular-nums;font-weight:700}.summary-original{color:var(--text-muted);display:block;font-size:22rpx;font-variant-numeric:tabular-nums;margin-top:2rpx;text-decoration:line-through}.bottom-action-bar .btn-primary,.bottom-action-bar .btn-secondary{-webkit-flex:1;-ms-flex:1;flex:1;font-size:28rpx;font-weight:600;line-height:1.2;padding:28rpx 0;text-align:center}.modal-overlay{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;padding:48rpx;z-index:1000}.modal-card{max-width:640rpx;padding:40rpx;width:100%}.modal-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;margin-bottom:24rpx;text-align:center}.modal-product{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;-webkit-justify-content:center;justify-content:center;margin-bottom:32rpx}.modal-icon-img{height:48rpx;width:48rpx}.modal-name{color:var(--text-primary);font-size:32rpx;font-weight:600}.quantity-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx}.qty-label{color:var(--text-secondary);font-size:28rpx}.qty-control{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx}.qty-btn{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-input);border:1rpx solid var(--border);border-radius:16rpx;color:var(--text-primary);display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:32rpx;font-weight:600;height:60rpx;-webkit-justify-content:center;justify-content:center;width:60rpx}.qty-num{color:var(--text-primary);font-size:32rpx;font-weight:700;min-width:48rpx;text-align:center}.modal-total{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;border-top:1rpx solid var(--border);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx;padding-top:24rpx}.total-label{color:var(--text-secondary);font-size:28rpx}.total-price{color:var(--accent-primary);font-size:36rpx;font-variant-numeric:tabular-nums;font-weight:800}.modal-actions{display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx}.modal-actions .btn-primary,.modal-actions .btn-secondary{-webkit-flex:1;-ms-flex:1;flex:1;font-size:28rpx;font-weight:600;padding:24rpx 0;text-align:center} \ No newline at end of file +.product-page{padding:0 32rpx 512rpx}.page-header{margin-bottom:24rpx;padding:0 24rpx 24rpx;position:relative;z-index:10}.page-header-inner{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;min-height:88rpx}.back-btn{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-card);border:1rpx solid var(--border-strong);border-radius:50%;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;height:80rpx;-webkit-justify-content:center;justify-content:center;left:30rpx;position:fixed;width:80rpx;z-index:41}.back-btn:active{-webkit-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.back-arrow{color:var(--text-primary);font-size:44rpx;font-weight:600;line-height:1}.nav-title{color:var(--text-primary);-webkit-flex:1;-ms-flex:1;flex:1;font-size:34rpx;font-weight:600;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.nav-placeholder{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:80rpx}.hero-section{width:100%}.hero-swiper{height:560rpx}.hero-block{background:var(--bg-muted);border-radius:24rpx;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);height:100%;overflow:hidden;position:relative}.hero-image{height:100%;width:100%}.hero-block-fallback{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:-webkit-linear-gradient(290deg,var(--accent-primary-strong),var(--accent-secondary));background:linear-gradient(160deg,var(--accent-primary-strong),var(--accent-secondary));display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.hero-fallback-icon{height:140rpx;margin-bottom:24rpx;width:140rpx}.detail-card{margin-top:24rpx;padding:32rpx}.price-line{-ms-flex-align:end;-ms-flex-pack:justify;-webkit-align-items:flex-end;align-items:flex-end;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx;-webkit-justify-content:space-between;justify-content:space-between}.price-left{-webkit-flex:1;-ms-flex:1;flex:1;min-width:0}.detail-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;line-height:1.3}.detail-desc{color:var(--text-secondary);display:block;font-size:24rpx;line-height:1.4;margin-top:8rpx}.price-right{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;text-align:right}.price{color:var(--accent-primary);display:block;font-size:40rpx;font-variant-numeric:tabular-nums;font-weight:800;line-height:1.2}.price-old{color:var(--text-muted);display:block;font-size:24rpx;font-variant-numeric:tabular-nums;margin-top:6rpx;text-decoration:line-through}.spec-row{-ms-flex-align:start;-ms-flex-pack:justify;-webkit-align-items:flex-start;align-items:flex-start;border-bottom:1rpx solid var(--border);display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx;-webkit-justify-content:space-between;justify-content:space-between;padding:24rpx 0}.spec-row:last-child{border-bottom:none;padding-bottom:0}.spec-key{color:var(--text-secondary);-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:26rpx}.spec-value{color:var(--text-primary);-webkit-flex:1;-ms-flex:1;flex:1;font-size:26rpx;font-weight:600;text-align:right;word-break:break-all}.detail-card .section-title{font-size:32rpx;font-weight:700;margin-bottom:24rpx}.detail-text{color:var(--text-secondary);display:block;font-size:28rpx;line-height:1.8}.bottom-action-bar{gap:20rpx;padding-left:32rpx;padding-right:32rpx}.bottom-action-bar .price-summary{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0}.summary-label{color:var(--text-secondary);display:block;font-size:22rpx}.summary-price{color:var(--accent-primary);display:block;font-size:36rpx;font-variant-numeric:tabular-nums;font-weight:700}.summary-original{color:var(--text-muted);display:block;font-size:22rpx;font-variant-numeric:tabular-nums;margin-top:2rpx;text-decoration:line-through}.bottom-action-bar .btn-primary,.bottom-action-bar .btn-secondary{-webkit-flex:1;-ms-flex:1;flex:1;font-size:28rpx;font-weight:600;line-height:1.2;padding:28rpx 0;text-align:center}.modal-overlay{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;padding:48rpx;z-index:1000}.modal-card{max-width:640rpx;padding:40rpx;width:100%}.modal-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;margin-bottom:24rpx;text-align:center}.modal-product{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;-webkit-justify-content:center;justify-content:center;margin-bottom:32rpx}.modal-icon-img{height:48rpx;width:48rpx}.modal-name{color:var(--text-primary);font-size:32rpx;font-weight:600}.quantity-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx}.qty-label{color:var(--text-secondary);font-size:28rpx}.qty-control{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx}.qty-btn{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-input);border:1rpx solid var(--border);border-radius:16rpx;color:var(--text-primary);display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:32rpx;font-weight:600;height:60rpx;-webkit-justify-content:center;justify-content:center;width:60rpx}.qty-num{color:var(--text-primary);font-size:32rpx;font-weight:700;min-width:48rpx;text-align:center}.modal-total{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;border-top:1rpx solid var(--border);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx;padding-top:24rpx}.total-label{color:var(--text-secondary);font-size:28rpx}.total-price{color:var(--accent-primary);font-size:36rpx;font-variant-numeric:tabular-nums;font-weight:800}.modal-actions{display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx}.modal-actions .btn-primary,.modal-actions .btn-secondary{-webkit-flex:1;-ms-flex:1;flex:1;font-size:28rpx;font-weight:600;padding:24rpx 0;text-align:center} \ No newline at end of file diff --git a/src/pages/product/index.scss b/src/pages/product/index.scss index e70f36e..1f2e74d 100644 --- a/src/pages/product/index.scss +++ b/src/pages/product/index.scss @@ -19,6 +19,9 @@ } .back-btn { + position: fixed; + left: 30rpx; + z-index: 41; width: 80rpx; height: 80rpx; flex: 0 0 auto; diff --git a/src/pages/product/index.tsx b/src/pages/product/index.tsx index c680424..8756ee3 100644 --- a/src/pages/product/index.tsx +++ b/src/pages/product/index.tsx @@ -32,9 +32,14 @@ export default function ProductPage() { - Taro.navigateBack()}> + Taro.navigateBack()} + > + 商品未找到 @@ -79,9 +84,14 @@ export default function ProductPage() { - Taro.navigateBack()}> + Taro.navigateBack()} + > + 商品详情