From 5af2dd151461ae2afb81aa4958d0016d16616cd3 Mon Sep 17 00:00:00 2001 From: hejin Date: Mon, 18 Aug 2025 01:10:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E4=BA=A7=E5=93=81=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E9=A1=B5=E9=9D=A2-75%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 7 ++ src/pages/products/index.vue | 175 +++++++++++++++++++++++++++++++---- 2 files changed, 163 insertions(+), 19 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 8ab97c4..4cbee17 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -63,4 +63,11 @@ export const categoryInfoApi = (id) => { **/ export const prodOrNewsCatgApi = (catgId) => { return request.get(`/web/prodCategory?catgId=${catgId}`) +} + +/** + * @function 获取产品分页数据 +**/ +export const prodPageApi = (params) => { + return request.get('/web/prodPageList', {params}) } \ No newline at end of file diff --git a/src/pages/products/index.vue b/src/pages/products/index.vue index bc4e628..17a9907 100644 --- a/src/pages/products/index.vue +++ b/src/pages/products/index.vue @@ -24,7 +24,12 @@ - + - - - + + + + {{item.label}} + + + + + + + {{item.title}} + + + + @@ -117,14 +193,12 @@ .main { width: 100%; display: flex; - .menu-box, .list-box { + .menu-box { + width: 32%; height: calc(100vh - 50px - (var(--status-bar-height)) - 34px); /* #ifdef H5 */ height: calc(100vh - 50px - (var(--status-bar-height)) - 81px); /* #endif */ - } - .menu-box { - width: 32%; border-right: 2rpx solid #e5edf4; ::v-deep .uni-collapse { background-color: transparent; @@ -175,7 +249,70 @@ } } .list-box { - flex: 1; + width: 68%; + padding-left: 16rpx; + .level3-box { + height: 68rpx; + white-space: nowrap; + .level3-item { + display: inline-block; + width: max-content; + height: 100%; + margin-right: 20rpx; + padding: 0 14rpx; + line-height: 68rpx; + color: #77778b; + background-color: #fff; + border-radius: 40rpx; + &:first-child { + padding: 0 36rpx; + } + &:last-child { + margin-right: 0; + } + } + .level3-active { + color: #015fe8; + border: 2rpx solid #015fe8; + } + } + .list-scroll { + width: 100%; + height: calc(100vh - 50px - 68rpx - (var(--status-bar-height)) - 34px); + /* #ifdef H5 */ + height: calc(100vh - 50px - 68rpx - (var(--status-bar-height)) - 81px); + /* #endif */ + background: linear-gradient(to bottom, #e4ecff 5%,#ffffff 15%); + .prod-item { + width: 100%; + height: 162rpx; + display: flex; + padding: 18rpx 0; + padding-right: 24rpx; + position: relative; + &::after { + content: ''; + width: calc(100% - 200rpx); + height: 2rpx; + position: absolute; + right: 0; + bottom: 0; + background-color: #eceef0; + } + image { + width: 165rpx; + height: 100%; + } + view { + flex: 1; + height: 99%; + padding-left: 34rpx; + padding-bottom: 10rpx; + color: #323437; + -webkit-line-clamp: 3; + } + } + } } } }