From 55ffcdb9d313f7394c83b2c37ef9ffe709d9f78c Mon Sep 17 00:00:00 2001 From: kk <875203880@qq.com> Date: Thu, 30 Apr 2026 15:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=A4=BA=E4=BE=8B=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 9 +- pages/index/index.vue | 194 +++++++++---- pages/order/order.vue | 641 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 795 insertions(+), 49 deletions(-) create mode 100644 pages/order/order.vue diff --git a/pages.json b/pages.json index 33aefb1..9fd42c4 100644 --- a/pages.json +++ b/pages.json @@ -15,8 +15,13 @@ { "path": "pages/faq/faq", "style": { - "navigationStyle": "custom", - "navigationBarTitleText": "常见问题" + "navigationStyle": "custom" + } + }, + { + "path": "pages/order/order", + "style": { + "navigationStyle": "custom" } } ], diff --git a/pages/index/index.vue b/pages/index/index.vue index 3194c90..90e9cdc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,25 +2,67 @@ - - 热销商品 - - - - - {{ item.name }} - {{ item.price }}元 + + + 热销商品 + + + - + + + + + 全部商品 + + + + {{ cat.category }} + + + + + + + + + + {{ item.name }} + + ¥ + {{ getDisplayPrice(item) }} + + + + + + + 暂无商品 + + + + + 加载中... + + + @@ -89,34 +131,26 @@ @@ -170,24 +248,46 @@ page { height: 100%; background-color: #fff; } /* ====== 首页样式 ====== */ .home-page { display: flex; flex-direction: column; height: 100%; } .product-area { flex: 1; overflow-y: auto; height: 0; } -.section-title { font-size: 36rpx; font-weight: bold; color: #333; padding: 24rpx 28rpx 16rpx; } + +/* 热销商品标题 + 装饰 */ +.section-title-wrap { display: flex; align-items: center; padding: 24rpx 28rpx 16rpx; } +.section-title { font-size: 36rpx; font-weight: bold; color: #333; } +.title-decoration { display: flex; align-items: center; margin-left: 16rpx; } +.deco-dot { width: 12rpx; height: 12rpx; background: #ff6b6b; border-radius: 50%; } +.deco-line { width: 40rpx; height: 6rpx; background: linear-gradient(90deg, #ff6b6b, transparent); margin-left: 6rpx; border-radius: 3rpx; } + +/* 分类 Tab 横向滚动 */ +.category-tabs { white-space: nowrap; padding: 0 20rpx; border-bottom: 1rpx solid #f0f0f0; } +.tabs-inner { display: inline-flex; padding: 0 8rpx; } +.tab-item { display: inline-flex; flex-direction: column; align-items: center; padding: 20rpx 24rpx; position: relative; } +.tab-text { font-size: 28rpx; color: #666; transition: color 0.2s; } +.tab-item.active .tab-text { color: #2979ff; font-weight: bold; } +.tab-underline { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 4rpx; background: #2979ff; border-radius: 2rpx; transition: width 0.2s; } +.tab-item.active .tab-underline { width: 48rpx; } + +/* 商品网格 */ .product-grid { display: flex; flex-wrap: wrap; padding: 12rpx; gap: 12rpx; } .product-card { width: calc((100% - 24rpx) / 3); text-align: center; } .product-img { width: 100%; height: 220rpx; border-radius: 8rpx; background-color: #f0f0f0; } .product-name { font-size: 24rpx; color: #333; padding: 10rpx 8rpx 6rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .product-price { font-size: 30rpx; font-weight: bold; color: #e4393c; padding: 0 8rpx 16rpx; } +.price-yen { font-size: 22rpx; } +.price-num { font-size: 32rpx; } /* 底部占位 */ .bottom-spacer { height: 160rpx; } /* 底部导航栏 */ .tab-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 120rpx; background: #fff; display: flex; align-items: center; justify-content: space-around; box-shadow: 0 -2rpx 16rpx rgba(0,0,0,0.08); z-index: 999; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); } -.tab-item { flex: 1; display: flex; align-items: center; justify-content: center; height: 100%; } -.tab-text { font-size: 28rpx; color: #999; font-weight: normal; } -.tab-item.active .tab-text { color: #2979ff; } +.tab-bar .tab-item { flex: 1; display: flex; align-items: center; justify-content: center; height: 100%; } +.tab-bar .tab-text { font-size: 28rpx; color: #999; font-weight: normal; } +.tab-bar .tab-item.active .tab-text { color: #2979ff; } .door-btn-wrapper { position: relative; display: flex; align-items: center; justify-content: center; margin-top: -80rpx; } .door-btn { width: 160rpx; height: 160rpx; border-radius: 50%; background: linear-gradient(135deg, #2979ff, #1e60e0); color: #fff; font-size: 38rpx; font-weight: bold; display: flex; align-items: center; justify-content: center; box-shadow: 0 10rpx 36rpx rgba(41,121,255,0.55); } +/* 空状态 / Loading */ +.empty-tip, .loading-tip { text-align: center; padding: 60rpx; color: #999; font-size: 28rpx; } + /* ====== 我的页面样式 ====== */ .mine-page { background-color: #f5f5f5; position: relative; overflow-y: auto; } .user-header { background: linear-gradient(135deg, #2979ff, #1e60e0); padding: 60rpx 40rpx; } diff --git a/pages/order/order.vue b/pages/order/order.vue new file mode 100644 index 0000000..746a60d --- /dev/null +++ b/pages/order/order.vue @@ -0,0 +1,641 @@ + + + + + \ No newline at end of file