diff --git a/public/imgs/shop/1.png b/public/imgs/shop/1.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/1.png differ diff --git a/public/imgs/shop/10.png b/public/imgs/shop/10.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/10.png differ diff --git a/public/imgs/shop/2.png b/public/imgs/shop/2.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/2.png differ diff --git a/public/imgs/shop/3.png b/public/imgs/shop/3.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/3.png differ diff --git a/public/imgs/shop/4.png b/public/imgs/shop/4.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/4.png differ diff --git a/public/imgs/shop/5.png b/public/imgs/shop/5.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/5.png differ diff --git a/public/imgs/shop/6.png b/public/imgs/shop/6.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/6.png differ diff --git a/public/imgs/shop/7.png b/public/imgs/shop/7.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/7.png differ diff --git a/public/imgs/shop/8.png b/public/imgs/shop/8.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/8.png differ diff --git a/public/imgs/shop/9.png b/public/imgs/shop/9.png new file mode 100644 index 0000000..85ad068 Binary files /dev/null and b/public/imgs/shop/9.png differ diff --git a/public/imgs/shop/tips.png b/public/imgs/shop/tips.png new file mode 100644 index 0000000..dc119a1 Binary files /dev/null and b/public/imgs/shop/tips.png differ diff --git a/src/router/index.js b/src/router/index.js index b22b1f0..dd92dc9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -96,6 +96,14 @@ const routes = [ title: '积分商城' } }, + { + path: '/productCategory', + name: 'ProductCategory', + component: () => import('@/views/ProductCategory.vue'), + meta: { + title: '商品分类' + } + }, { path: '/product/:id', name: 'ProductDetail', diff --git a/src/views/ProductCategory.vue b/src/views/ProductCategory.vue new file mode 100644 index 0000000..b9acca2 --- /dev/null +++ b/src/views/ProductCategory.vue @@ -0,0 +1,237 @@ + + + + < + 返回 + + + + + + 搜索 + + + + + {{ item.name }} + + + + + + + {{ item.name }} + + + + + + + + diff --git a/src/views/Shop.vue b/src/views/Shop.vue index 73aee0a..c32389b 100644 --- a/src/views/Shop.vue +++ b/src/views/Shop.vue @@ -1,300 +1,78 @@ - - - - - - 全部商品 - - - - - 积分余额: - {{ userPoints }} - - - - - 融豆余额: - {{ userBeans }} - - - - - - - - + + + - + + 搜索 - - - - - - {{ category.icon }} - {{ category.name }} - - - - - - - - - - 热销推荐 - - - - - {{ product.discount }}折 - - - - {{ product.name }} - - - - {{ product.rongdou_price }} - - - - {{ product.points_price }} - - - - + + + + {{ item.name }} - - - - 秒杀推荐 - - - - - {{ product.discount }}折 - - - - {{ product.name }} - - - - {{ product.flash_price }} - - - - {{ product.flash_price*10000 }} - - - + + + + + + + + + + {{ item.name }} + + + {{ item.points_price }} + + + + {{ item.rongdou_price }} - - - - 热门商品 - - - {{ sortText }} - - - - - 默认排序 - 价格从低到高 - 价格从高到低 - 销量优先 - - - - - - - - - - - {{ product.discount }}折 - - - {{ product.name }} - - - - {{ product.rongdou_price }} - - - - {{ product.points_price }} - - - - - - - - - 暂无商品 - - - - - - 加载更多 - - + - -.points-icon { - font-size: 10px; - width: 10px; - height: 10px; -} - -.points-price { - color: #999; - font-size: 10px; -} - -.empty-state { - text-align: center; - padding: 60px 20px; - color: #999; -} - -.load-more { - text-align: center; - padding: 20px; -} - - - -/* 响应式设计 */ -@media (max-width: 480px) { - .products-grid { - grid-template-columns: repeat(2, 1fr); - justify-items: center; - } - - .product-card { - width: calc(50vw - 24px); - max-width: 163px; - } -} - -/* 推荐 */ -.recommend { - display: flex; - justify-content: space-between; - padding: 16px; - margin: 16px; - background: rgba(255, 255, 255, 0.9); - border-radius: 12px; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); - backdrop-filter: blur(5px); - -webkit-backdrop-filter: blur(5px); -} - -.recommend-grid { - flex: 1; - margin: 0 8px; -} - -.recommend-product { - display: flex; - align-items: center; - width: 144px; - height: 54px; - background: rgba(255, 255, 255, 0.95); - border-radius: 8px; - padding: 6px; - margin-bottom: 8px; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); - transition: all 0.3s ease; -} - -.recommend-product:hover { - transform: translateY(-2px); - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); -} - -.recommend-image { - position: relative; - width: 42px; - height: 42px; - flex-shrink: 0; - margin-right: 8px; - border-radius: 6px; - overflow: hidden; -} - -.recommend-image img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.recommend-discount { - position: absolute; - top: 2px; - right: 2px; - background: #ff4757; - color: white; - padding: 1px 4px; - border-radius: 3px; - font-size: 10px; - line-height: 1; -} - -.recommend-content { - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - overflow: hidden; -} - -.recommend-name { - margin: 0; - font-size: 12px; - font-weight: 500; - color: #333; - line-height: 1.3; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - margin-bottom: 3px; -} - -.recommend-price-container { - position: relative; -} - -.recommend-price-container .main-price { - display: flex; - align-items: center; - gap: 2px; -} - -.recommend-price-container .rongdou-icon { - width: 12px; - height: 12px; - object-fit: contain; -} - -.recommend-price-container .rongdou-price { - color: #ff6b35; - font-weight: 600; - font-size: 12px; - line-height: 1; -} - -.recommend-price-container .sub-price { - display: flex; - align-items: center; - gap: 1px; - margin-top: 2px; -} - -.recommend-price-container .points-icon { - font-size: 8px; - width: 8px; - height: 8px; -} - -.recommend-price-container .points-price { - color: #999; - font-size: 8px; - line-height: 1; -} - - \ No newline at end of file
暂无商品