From 66fdb81baaae5328f7e4dbd7b0342bbe941f16fc Mon Sep 17 00:00:00 2001
From: wyy <3234929097@qq.com>
Date: Mon, 31 Jul 2023 11:49:47 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=88=86=E7=B1=BB=E5=95=86?=
=?UTF-8?q?=E5=93=81=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mall4uni/pages.json | 3 +
mall4uni/pages/category/category.css | 26 +-
mall4uni/pages/category/category.vue | 301 ++++++++-----------
mall4uni/pages/sub-category/sub-category.css | 113 +++++++
mall4uni/pages/sub-category/sub-category.vue | 159 ++++++++++
5 files changed, 430 insertions(+), 172 deletions(-)
create mode 100644 mall4uni/pages/sub-category/sub-category.css
create mode 100644 mall4uni/pages/sub-category/sub-category.vue
diff --git a/mall4uni/pages.json b/mall4uni/pages.json
index c6b7d4b..af64f43 100644
--- a/mall4uni/pages.json
+++ b/mall4uni/pages.json
@@ -40,6 +40,9 @@
"navigationBarTextStyle": "black"
}
},
+ {
+ "path": "pages/sub-category/sub-category"
+ },
{
"path": "pages/search-page/search-page",
"style": {
diff --git a/mall4uni/pages/category/category.css b/mall4uni/pages/category/category.css
index 56d6839..6e418e2 100644
--- a/mall4uni/pages/category/category.css
+++ b/mall4uni/pages/category/category.css
@@ -227,6 +227,30 @@ page {
font-family: arial;
}
+.th-cate-con{
+ display: flex;
+ flex-wrap: wrap;
+}
+.sub-category{
+ width: 33.33%;
+ display: flex;
+ flex-direction: column;
+ padding: 30rpx;
+ box-sizing: border-box;
+ align-items: center;
+}
+.sub-category-item > .more-pic{
+ width: 120rpx;
+ height: 120rpx;
+ padding-bottom:10rpx;
+}
+.sub-category-item text{
+ font-size: 25rpx;
+ word-break: break-word;
+}
+
+
+
/* 空 */
.cont-item.empty {
display: block;
@@ -241,4 +265,4 @@ page {
text-align: center;
color: #aaa;
font-size: 24rpx;
-}
\ No newline at end of file
+}
diff --git a/mall4uni/pages/category/category.vue b/mall4uni/pages/category/category.vue
index 7350a00..7723372 100644
--- a/mall4uni/pages/category/category.vue
+++ b/mall4uni/pages/category/category.vue
@@ -1,194 +1,153 @@
-
-
-
-
-
-
-
-
-
-
- 搜索您想要的商品
+
+
+
+
+
+
+
+ 搜索您想要的商品
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- {{item.prodName}}
- {{item.brief}}
-
- ¥ {{wxs.parsePrice(item.price)[0]}}.{{wxs.parsePrice(item.price)[1]}}
+
+
+
+
+
+
+ {{ thCateItem.categoryName }}
-
-
- {{categoryList && categoryList.length ? '该分类下暂无商品' : '暂无商品'}}
-
-
-
-
+ 该分类下暂无子分类~
+
+
+
+
-
-
-
-
-
-
-
+
+
-
\ No newline at end of file
+ }
+ };
+
+
\ No newline at end of file
diff --git a/mall4uni/pages/sub-category/sub-category.css b/mall4uni/pages/sub-category/sub-category.css
new file mode 100644
index 0000000..c8076e6
--- /dev/null
+++ b/mall4uni/pages/sub-category/sub-category.css
@@ -0,0 +1,113 @@
+/* pages/sub-category/sub-category.wxss */
+
+page {
+ background: #f4f4f4;
+}
+
+.category-tit {
+ width: 100%;
+ white-space: nowrap;
+ position: fixed;
+ top: 0px;
+ z-index: 999;
+ background-color: #fff;
+ border-bottom: 2rpx solid #f4f4f4;
+ font-size: 30rpx;
+}
+
+.category-tit .category-item {
+ display: inline-block;
+ padding: 20rpx 10rpx;
+ margin: 0 20rpx;
+ box-sizing: border-box;
+ font-size: 28rpx;
+}
+
+.prod-item {
+ margin-top: 100rpx;
+}
+
+.on {
+ border-bottom: 4rpx solid #e43130;
+ color: #e43130;
+}
+/* 清除 scroll-view 滚动条 */
+::-webkit-scrollbar {
+ width: 0;
+ height: 0;
+ color: transparent;
+}
+/* 列表为空 */
+.empty {
+ margin-top: 200rpx;
+}
+
+/* 商品列表 */
+ .prod-items {
+ width: 345rpx;
+ display: inline-block;
+ background: #fff;
+ padding-bottom: 20rpx;
+ box-sizing: border-box;
+ box-shadow: 0rpx 6rpx 8rpx rgba(58,134,185,0.2);
+}
+
+.prod-items:nth-child(2n-1) {
+ margin: 20rpx 10rpx 10rpx 20rpx;
+}
+
+.prod-items:nth-child(2n) {
+ margin: 20rpx 20rpx 10rpx 10rpx;
+}
+
+.prod-items .hot-imagecont .hotsaleimg {
+ width: 341rpx;
+ height: 341rpx;
+}
+
+.prod-items .hot-text .hotprod-text {
+ font-size: 28rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.prod-items .hot-imagecont {
+ font-size: 0;
+ text-align: center;
+}
+
+.prod-items .hot-text {
+ margin-top: 20rpx;
+ padding: 0 10rpx;
+}
+
+.prod-items .hot-text .prod-info, .more-prod .prod-text-right .prod-info {
+ font-size: 22rpx;
+ color: #999;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.prod-items .hot-text .prod-text-info {
+ position: relative;
+ height: 70rpx;
+ line-height: 70rpx;
+ font-family: Arial;
+}
+
+.prod-items .hot-text .prod-text-info .hotprod-price {
+ display: inline;
+ font-size: 26rpx;
+ color: #eb2444;
+}
+
+.prod-items .hot-text .prod-text-info .basket-img {
+ width: 50rpx;
+ height: 50rpx;
+ position: absolute;
+ right: 0;
+ bottom: 7rpx;
+ padding: 8rpx;
+}
\ No newline at end of file
diff --git a/mall4uni/pages/sub-category/sub-category.vue b/mall4uni/pages/sub-category/sub-category.vue
new file mode 100644
index 0000000..695472b
--- /dev/null
+++ b/mall4uni/pages/sub-category/sub-category.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+ {{ item.categoryName }}
+
+
+
+
+
+
+
+
+
+
+ {{prod.prodName}}
+ {{prod.brief}}
+
+
+ ¥
+ {{wxs.parsePrice(prod.price)[0]}}
+ .{{wxs.parsePrice(prod.price)[1]}}
+
+
+
+
+
+
+
+ 暂无商品数据~
+
+
+
+
+
+
+
+