Dianpu.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <link rel="stylesheet" href="path/to/Common.css">
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  7. <title>饰品商城 - 店铺</title>
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  15. }
  16. body {
  17. background-color: #f5f5f5;
  18. color: #333;
  19. font-size: 14px;
  20. padding-bottom: 60px; /* 为底部tab栏留出空间 */
  21. }
  22. /* 顶部标签栏 */
  23. .header {
  24. position: fixed;
  25. top: 0;
  26. left: 0;
  27. right: 0;
  28. background-color: #fff;
  29. z-index: 100;
  30. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  31. }
  32. .tab-container {
  33. display: flex;
  34. align-items: center;
  35. padding: 10px 0;
  36. border-bottom: 1px solid #eee;
  37. }
  38. .tabs {
  39. flex: 1;
  40. overflow-x: auto;
  41. white-space: nowrap;
  42. scrollbar-width: none; /* Firefox */
  43. -ms-overflow-style: none; /* IE and Edge */
  44. }
  45. .tabs::-webkit-scrollbar {
  46. display: none; /* Chrome, Safari, Opera */
  47. }
  48. .tab {
  49. display: inline-block;
  50. padding: 5px 12px;
  51. margin: 0 5px;
  52. border-radius: 15px;
  53. font-size: 14px;
  54. color: #666;
  55. }
  56. .tab.active {
  57. background-color: #1890ff;
  58. color: white;
  59. }
  60. .action-buttons {
  61. display: flex;
  62. padding: 0 10px;
  63. }
  64. .action-btn {
  65. padding: 5px;
  66. color: #666;
  67. font-size: 16px;
  68. }
  69. /* 内容区域 */
  70. .content {
  71. margin-top: 50px; /* 顶部标签栏高度 */
  72. padding: 10px;
  73. }
  74. /* 店铺信息 */
  75. .shop-header {
  76. display: flex;
  77. align-items: center;
  78. background-color: white;
  79. padding: 15px;
  80. border-radius: 8px;
  81. margin-bottom: 15px;
  82. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  83. }
  84. .shop-avatar {
  85. width: 60px;
  86. height: 60px;
  87. border-radius: 50%;
  88. background-color: #f0f0f0;
  89. margin-right: 15px;
  90. overflow: hidden;
  91. }
  92. .shop-avatar img {
  93. width: 100%;
  94. height: 100%;
  95. object-fit: cover;
  96. }
  97. .shop-info {
  98. flex: 1;
  99. }
  100. .shop-name {
  101. font-size: 18px;
  102. font-weight: bold;
  103. margin-bottom: 5px;
  104. }
  105. .shop-stats {
  106. display: flex;
  107. font-size: 12px;
  108. color: #666;
  109. }
  110. .shop-stat {
  111. margin-right: 15px;
  112. }
  113. .shop-stat i {
  114. margin-right: 3px;
  115. }
  116. .follow-btn {
  117. padding: 5px 15px;
  118. background-color: #1890ff;
  119. color: white;
  120. border-radius: 15px;
  121. font-size: 14px;
  122. border: none;
  123. }
  124. /* 店铺导航 */
  125. .shop-nav {
  126. display: flex;
  127. background-color: white;
  128. border-radius: 8px;
  129. margin-bottom: 15px;
  130. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  131. }
  132. .nav-item {
  133. flex: 1;
  134. text-align: center;
  135. padding: 12px 0;
  136. font-size: 14px;
  137. color: #666;
  138. border-bottom: 2px solid transparent;
  139. }
  140. .nav-item.active {
  141. color: #1890ff;
  142. border-bottom-color: #1890ff;
  143. }
  144. /* 店铺公告 */
  145. .shop-notice {
  146. background-color: white;
  147. padding: 15px;
  148. border-radius: 8px;
  149. margin-bottom: 15px;
  150. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  151. }
  152. .notice-title {
  153. font-size: 14px;
  154. font-weight: bold;
  155. margin-bottom: 10px;
  156. color: #333;
  157. }
  158. .notice-content {
  159. font-size: 13px;
  160. color: #666;
  161. line-height: 1.5;
  162. }
  163. /* 饰品列表 */
  164. .item-list {
  165. display: flex;
  166. flex-wrap: wrap;
  167. margin: 0 -5px;
  168. }
  169. .item-card {
  170. width: calc(50% - 10px);
  171. margin: 5px;
  172. background-color: white;
  173. border-radius: 8px;
  174. overflow: hidden;
  175. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  176. }
  177. .item-image {
  178. position: relative;
  179. width: 100%;
  180. padding-top: 56.25%; /* 16:9 宽高比 */
  181. background-color: #f0f0f0;
  182. overflow: hidden;
  183. }
  184. .item-image img {
  185. position: absolute;
  186. top: 0;
  187. left: 0;
  188. width: 100%;
  189. height: 100%;
  190. object-fit: cover;
  191. }
  192. .item-info {
  193. padding: 10px;
  194. }
  195. .item-name {
  196. font-size: 14px;
  197. font-weight: bold;
  198. margin-bottom: 5px;
  199. white-space: nowrap;
  200. overflow: hidden;
  201. text-overflow: ellipsis;
  202. }
  203. .item-wear {
  204. font-size: 12px;
  205. color: #666;
  206. margin-bottom: 5px;
  207. }
  208. .item-price {
  209. font-size: 16px;
  210. color: #f56c6c;
  211. font-weight: bold;
  212. }
  213. /* 底部Tab栏 */
  214. .tab-bar {
  215. position: fixed;
  216. bottom: 0;
  217. left: 0;
  218. right: 0;
  219. display: flex;
  220. background-color: white;
  221. border-top: 1px solid #eee;
  222. z-index: 100;
  223. }
  224. .tab-item {
  225. flex: 1;
  226. display: flex;
  227. flex-direction: column;
  228. align-items: center;
  229. justify-content: center;
  230. padding: 8px 0;
  231. color: #666;
  232. }
  233. .tab-item.active {
  234. color: #1890ff;
  235. }
  236. .tab-item i {
  237. font-size: 20px;
  238. margin-bottom: 2px;
  239. }
  240. .tab-item span {
  241. font-size: 12px;
  242. }
  243. </style>
  244. </head>
  245. <body>
  246. <!-- 顶部标签栏 -->
  247. <div class="header">
  248. <div class="tab-container">
  249. <div class="tabs">
  250. <span class="tab">全部商品</span>
  251. <span class="tab active">热门商品</span>
  252. <span class="tab">最新上架</span>
  253. <span class="tab">促销特惠</span>
  254. <span class="tab">刀型专区</span>
  255. <span class="tab">手套专区</span>
  256. <span class="tab">印花收藏</span>
  257. </div>
  258. <div class="action-buttons">
  259. <div class="action-btn"><i class="bi bi-search"></i></div>
  260. </div>
  261. </div>
  262. </div>
  263. <!-- 内容区域 -->
  264. <div class="content">
  265. <!-- 店铺信息 -->
  266. <div class="shop-header">
  267. <div class="shop-avatar">
  268. <img src="https://via.placeholder.com/60" alt="店铺头像">
  269. </div>
  270. <div class="shop-info">
  271. <div class="shop-name">专业饰品交易店</div>
  272. <div class="shop-stats">
  273. <div class="shop-stat"><i class="bi bi-star-fill"></i>4.9</div>
  274. <div class="shop-stat"><i class="bi bi-people"></i>5.2k粉丝</div>
  275. <div class="shop-stat"><i class="bi bi-box-seam"></i>1.8k商品</div>
  276. </div>
  277. </div>
  278. <button class="follow-btn">+ 关注</button>
  279. </div>
  280. <!-- 店铺导航 -->
  281. <div class="shop-nav">
  282. <div class="nav-item active">商品</div>
  283. <div class="nav-item">评价</div>
  284. <div class="nav-item">详情</div>
  285. <div class="nav-item">活动</div>
  286. </div>
  287. <!-- 店铺公告 -->
  288. <div class="shop-notice">
  289. <div class="notice-title"><i class="bi bi-megaphone"></i> 店铺公告</div>
  290. <div class="notice-content">
  291. 本店所有商品均为正品,支持官方验货。满1000元减50元优惠活动进行中,多买多优惠!新用户首次购物享9折优惠!
  292. </div>
  293. </div>
  294. <!-- 饰品列表 -->
  295. <div class="item-list">
  296. <div class="item-card">
  297. <div class="item-image">
  298. <img src="https://via.placeholder.com/300x169" alt="饰品图片">
  299. </div>
  300. <div class="item-info">
  301. <div class="item-name">蝴蝶刀 | 渐变大理石 (崭新出厂)</div>
  302. <div class="item-wear">磨损: 0.001234</div>
  303. <div class="item-price">¥ 5,999.00</div>
  304. </div>
  305. </div>
  306. <div class="item-card">
  307. <div class="item-image">
  308. <img src="https://via.placeholder.com/300x169" alt="饰品图片">
  309. </div>
  310. <div class="item-info">
  311. <div class="item-name">M9刺刀 | 多普勒 (崭新出厂)</div>
  312. <div class="item-wear">磨损: 0.002345</div>
  313. <div class="item-price">¥ 4,299.00</div>
  314. </div>
  315. </div>
  316. <div class="item-card">
  317. <div class="item-image">
  318. <img src="https://via.placeholder.com/300x169" alt="饰品图片">
  319. </div>
  320. <div class="item-info">
  321. <div class="item-name">手套 | 深红之网 (战痕累累)</div>
  322. <div class="item-wear">磨损: 0.456789</div>
  323. <div class="item-price">¥ 2,499.00</div>
  324. </div>
  325. </div>
  326. <div class="item-card">
  327. <div class="item-image">
  328. <img src="https://via.placeholder.com/300x169" alt="饰品图片">
  329. </div>
  330. <div class="item-info">
  331. <div class="item-name">AWP | 二西莫夫 (崭新出厂)</div>
  332. <div class="item-wear">磨损: 0.012345</div>
  333. <div class="item-price">¥ 1,299.00</div>
  334. </div>
  335. </div>
  336. <div class="item-card">
  337. <div class="item-image">
  338. <img src="https://via.placeholder.com/300x169" alt="饰品图片">
  339. </div>
  340. <div class="item-info">
  341. <div class="item-name">AK-47 | 燃料喷射器 (略有磨损)</div>
  342. <div class="item-wear">磨损: 0.123456</div>
  343. <div class="item-price">¥ 899.00</div>
  344. </div>
  345. </div>
  346. <div class="item-card">
  347. <div class="item-image">
  348. <img src="https://via.placeholder.com/300x169" alt="饰品图片">
  349. </div>
  350. <div class="item-info">
  351. <div class="item-name">沙漠之鹰 | 印花集 (崭新出厂)</div>
  352. <div class="item-wear">磨损: 0.012345</div>
  353. <div class="item-price">¥ 399.00</div>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. <!-- 底部Tab栏 -->
  359. <div class="tab-bar">
  360. <div class="tab-item ">
  361. <a href="home.html">
  362. <i class="bi bi-house"></i>
  363. <span>首页</span>
  364. </a>
  365. </div>
  366. <div class="tab-item">
  367. <a href="discover.html">
  368. <i class="bi bi-compass"></i>
  369. <span>发现</span>
  370. </a>
  371. </div>
  372. <div class="tab-item">
  373. <a href="Kucun.html">
  374. <i class="bi bi-bag"></i>
  375. <span>库存</span>
  376. </a>
  377. </div>
  378. <div class="tab-item active">
  379. <a href="Dianpu.html">
  380. <i class="bi bi-shop"></i>
  381. <span>店铺</span>
  382. </a>
  383. </div>
  384. <div class="tab-item">
  385. <a href="WOde.html">
  386. <i class="bi bi-person"></i>
  387. <span>我</span>
  388. </a>
  389. </div>
  390. </div>
  391. <script>
  392. // 简单的交互逻辑
  393. document.addEventListener('DOMContentLoaded', function() {
  394. // 切换顶部标签
  395. const tabs = document.querySelectorAll('.tab');
  396. tabs.forEach(tab => {
  397. tab.addEventListener('click', function() {
  398. tabs.forEach(t => t.classList.remove('active'));
  399. this.classList.add('active');
  400. });
  401. });
  402. // 切换店铺导航
  403. const navItems = document.querySelectorAll('.nav-item');
  404. navItems.forEach(item => {
  405. item.addEventListener('click', function() {
  406. navItems.forEach(i => i.classList.remove('active'));
  407. this.classList.add('active');
  408. });
  409. });
  410. // 切换底部Tab
  411. const tabItems = document.querySelectorAll('.tab-item');
  412. tabItems.forEach(item => {
  413. item.addEventListener('click', function() {
  414. tabItems.forEach(i => i.classList.remove('active'));
  415. this.classList.add('active');
  416. });
  417. });
  418. // 关注按钮点击
  419. const followBtn = document.querySelector('.follow-btn');
  420. followBtn.addEventListener('click', function() {
  421. if(this.textContent === '+ 关注') {
  422. this.textContent = '已关注';
  423. this.style.backgroundColor = '#ccc';
  424. } else {
  425. this.textContent = '+ 关注';
  426. this.style.backgroundColor = '#1890ff';
  427. }
  428. });
  429. });
  430. </script>
  431. </body>
  432. </html>