sanqiang-client-product-detail-ui-demo.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  6. <title>陇耘鲜达 - 客户端商品详情UI Demo</title>
  7. <style>
  8. :root {
  9. --green: #0a9f6d;
  10. --green-soft: #e9f9f2;
  11. --yellow: #d6a343;
  12. --bg: #f5f8f7;
  13. --card: #ffffff;
  14. --text: #1f2a26;
  15. --muted: #6b7b74;
  16. --border: #dcebe4;
  17. --danger: #d14343;
  18. --shadow: 0 8px 20px rgba(10, 159, 109, 0.12);
  19. }
  20. * { box-sizing: border-box; margin: 0; padding: 0; }
  21. body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; background: var(--bg); color: var(--text); }
  22. .phone { max-width: 420px; margin: 0 auto; min-height: 100vh; padding-bottom: 100px; }
  23. .top {
  24. position: sticky;
  25. top: 0;
  26. z-index: 20;
  27. background: linear-gradient(145deg, #0a9f6d, #11b37a);
  28. color: #fff;
  29. padding: 12px 16px 14px;
  30. border-bottom-left-radius: 18px;
  31. border-bottom-right-radius: 18px;
  32. box-shadow: var(--shadow);
  33. }
  34. .top-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
  35. .back { color: #fff; text-decoration: none; font-weight: 600; }
  36. .banner {
  37. margin: 12px 16px 0;
  38. border-radius: 14px;
  39. overflow: hidden;
  40. height: 220px;
  41. background: linear-gradient(145deg, #f4fbf8, #dff2e9);
  42. border: 1px solid var(--border);
  43. position: relative;
  44. }
  45. .dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; display: flex; gap: 6px; }
  46. .dot { width: 16px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.45); }
  47. .dot.active { width: 24px; background: #fff; }
  48. .section { margin: 12px 16px; }
  49. .card {
  50. background: var(--card);
  51. border: 1px solid var(--border);
  52. border-radius: 14px;
  53. padding: 12px;
  54. }
  55. .price-line { display: flex; align-items: baseline; gap: 4px; }
  56. .price { font-size: 28px; color: var(--danger); font-weight: 700; }
  57. .unit { font-size: 12px; color: var(--muted); }
  58. .name { margin-top: 8px; font-size: 16px; line-height: 1.4; font-weight: 600; }
  59. .sku { margin-top: 6px; font-size: 12px; color: var(--muted); }
  60. .tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
  61. .tag {
  62. min-height: 24px;
  63. padding: 0 10px;
  64. border-radius: 12px;
  65. background: var(--green-soft);
  66. color: var(--green);
  67. font-size: 11px;
  68. display: inline-flex;
  69. align-items: center;
  70. }
  71. .title { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; }
  72. .title span { color: var(--muted); font-size: 12px; font-weight: 400; }
  73. .param-list { display: grid; gap: 8px; }
  74. .param { display: grid; grid-template-columns: 92px 1fr; gap: 8px; font-size: 13px; padding: 8px 0; border-top: 1px solid #edf5f1; }
  75. .param:first-child { border-top: 0; padding-top: 0; }
  76. .pname { color: var(--muted); }
  77. .pvalue { color: var(--text); }
  78. .desc {
  79. font-size: 13px;
  80. line-height: 1.6;
  81. color: #33423c;
  82. background: #f8fcfa;
  83. border: 1px solid #e8f3ee;
  84. border-radius: 10px;
  85. padding: 10px;
  86. }
  87. .media {
  88. margin-top: 10px;
  89. height: 140px;
  90. border-radius: 10px;
  91. border: 1px dashed #cfe6da;
  92. background: linear-gradient(145deg, #f7fcfa, #ebf6f1);
  93. display: flex;
  94. align-items: center;
  95. justify-content: center;
  96. color: #7d9188;
  97. font-size: 12px;
  98. }
  99. .review-card { border-top: 1px solid #edf5f1; padding-top: 10px; margin-top: 10px; }
  100. .review-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
  101. .score { color: #d6a343; font-weight: 700; }
  102. .review-text { margin-top: 8px; font-size: 13px; color: #3b4a43; line-height: 1.5; }
  103. .thumbs { margin-top: 8px; display: flex; gap: 8px; }
  104. .thumb {
  105. width: 64px;
  106. height: 64px;
  107. border-radius: 8px;
  108. background: linear-gradient(145deg, #eef8f3, #dbefe5);
  109. border: 1px solid #dcebe4;
  110. }
  111. .bar {
  112. position: fixed;
  113. left: 50%;
  114. transform: translateX(-50%);
  115. bottom: 0;
  116. width: min(420px, 100%);
  117. background: #fff;
  118. border-top: 1px solid var(--border);
  119. display: flex;
  120. justify-content: space-between;
  121. align-items: center;
  122. padding: 10px 14px 14px;
  123. gap: 10px;
  124. }
  125. .icons { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
  126. .icon { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 40px; }
  127. .actions { flex: 1; display: flex; gap: 8px; }
  128. .btn {
  129. flex: 1;
  130. min-height: 42px;
  131. border-radius: 21px;
  132. display: inline-flex;
  133. align-items: center;
  134. justify-content: center;
  135. color: #fff;
  136. font-size: 14px;
  137. font-weight: 600;
  138. }
  139. .btn-cart { background: #f3a43b; }
  140. .btn-buy { background: var(--green); }
  141. </style>
  142. </head>
  143. <body>
  144. <main class="phone">
  145. <header class="top">
  146. <div class="top-row">
  147. <a class="back" href="./sanqiang-client-cart-ui-demo.html">← 返回购物车</a>
  148. <span>商品详情</span>
  149. <span>···</span>
  150. </div>
  151. </header>
  152. <section class="banner">
  153. <div class="dots"><span class="dot active"></span><span class="dot"></span><span class="dot"></span></div>
  154. </section>
  155. <section class="section">
  156. <article class="card">
  157. <div class="price-line"><span class="price">¥8.80</span><span class="unit">/500g</span></div>
  158. <div class="name">云南有机小青菜 500g(新鲜叶菜)</div>
  159. <div class="sku">SKU:SQ-VEG-00128</div>
  160. <div class="tags">
  161. <span class="tag">24小时内采收</span>
  162. <span class="tag">可追溯基地</span>
  163. <span class="tag">支持当日达</span>
  164. </div>
  165. </article>
  166. </section>
  167. <section class="section">
  168. <article class="card">
  169. <div class="title">商品参数 <span>与小程序详情页字段对齐</span></div>
  170. <div class="param-list">
  171. <div class="param"><span class="pname">规格</span><span class="pvalue">500g/份</span></div>
  172. <div class="param"><span class="pname">产地</span><span class="pvalue">云南昆明</span></div>
  173. <div class="param"><span class="pname">储存方式</span><span class="pvalue">0-4℃冷藏</span></div>
  174. <div class="param"><span class="pname">保质期</span><span class="pvalue">3天</span></div>
  175. </div>
  176. </article>
  177. </section>
  178. <section class="section">
  179. <article class="card">
  180. <div class="title">商品详情 <span>富文本 + 图文/视频</span></div>
  181. <div class="desc">基地每日清晨采摘,叶片完整,口感脆嫩。适合快炒、清汤、蒜蓉蒸制等家庭场景。支持团餐和门店批量采购。</div>
  182. <div class="media">详情图片/视频展示区(运营端可配置)</div>
  183. </article>
  184. </section>
  185. <section class="section">
  186. <article class="card">
  187. <div class="title">商品评价 <span>查看全部 &gt;</span></div>
  188. <div class="review-head"><span>综合评分 <strong class="score">4.8</strong></span><span>共 126 条</span></div>
  189. <div class="review-card">
  190. <div class="review-head"><span>匿名用户 · ★★★★★</span><span>2026-04-16</span></div>
  191. <div class="review-text">叶子很新鲜,分量足,配送很快,晚上下单次日上午就送达了。</div>
  192. <div class="thumbs"><span class="thumb"></span><span class="thumb"></span><span class="thumb"></span></div>
  193. </div>
  194. </article>
  195. </section>
  196. </main>
  197. <footer class="bar">
  198. <div class="icons">
  199. <span class="icon"><span>🏠</span><span>首页</span></span>
  200. <span class="icon"><span>🛒</span><span>购物车</span></span>
  201. </div>
  202. <div class="actions">
  203. <span class="btn btn-cart">加入购物车</span>
  204. <span class="btn btn-buy">立即购买</span>
  205. </div>
  206. </footer>
  207. </body>
  208. </html>