From d64112398778079ac75617d3e47af5a575d796fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Wed, 13 Apr 2022 14:34:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E5=AE=B6=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=A8=A1=E7=89=88=E6=98=BE=E7=A4=BA=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/goods/goods-seller/addGoods.scss | 84 ++++++++++--------- .../goods-seller/goodsOperationFirst.vue | 64 +++++++++----- 2 files changed, 88 insertions(+), 60 deletions(-) diff --git a/seller/src/views/goods/goods-seller/addGoods.scss b/seller/src/views/goods/goods-seller/addGoods.scss index e55a38da..51e99e9b 100644 --- a/seller/src/views/goods/goods-seller/addGoods.scss +++ b/seller/src/views/goods/goods-seller/addGoods.scss @@ -76,15 +76,13 @@ text-align: left; } } -.sku-val{ +.sku-val { justify-content: flex-start; flex-wrap: wrap; - >.ivu-form{ + > .ivu-form { flex-wrap: wrap !important; } - /deep/ .sku-item-content-val{ - - + /deep/ .sku-item-content-val { margin-right: 20px; } } @@ -123,16 +121,16 @@ div.base-info-item { display: flex; width: 100% !important; flex: 1; - + flex-direction: column; align-items: flex-start; justify-content: flex-start; width: 100%; - >.ivu-card-body{ + > .ivu-card-body { width: 100%; } - .ivu-card-body{ + .ivu-card-body { width: 100%; justify-content: center; align-items: flex-start; @@ -145,7 +143,6 @@ div.base-info-item { width: 100%; } } - } .shop-category-text { @@ -456,38 +453,6 @@ div.base-info-item { .goods-type-list { max-height: 500px; overflow-y: auto; - - > .goods-type-item { - padding: 20px 0; - width: 100%; - cursor: pointer; - transition: 0.35s; - display: flex; - justify-content: center; - align-items: center; - - /deep/ img { - margin-right: 20px; - width: 100px; - } - - /deep/ h2 { - cursor: pointer; - font-size: 21px; - padding: 10px 0; - color: #333; - } - - /deep/ p { - color: #999; - font-size: 14px; - margin-top: 10px; - } - } - - > .goods-type-item:hover { - transform: translateY(-10px); - } } .template-item { @@ -499,3 +464,40 @@ div.base-info-item { max-height: auto !important; min-height: 240px !important; } + +.goods-type-item { + padding: 20px 0; + width: 100%; + cursor: pointer; + transition: 0.35s; + display: flex; + justify-content: center; + align-items: center; + + /deep/ img { + margin-right: 20px; + width: 100px; + margin-left: 10px; + } + + + + /deep/ p { + color: #999; + font-size: 14px; + margin-top: 10px; + } +} + +.goods-type-item:hover { + background: #ededed; +} +.goods-list-box { + height: 450px; + overflow: auto; +} +h2 { + cursor: pointer; + font-size: 21px; + color: #333; +} diff --git a/seller/src/views/goods/goods-seller/goodsOperationFirst.vue b/seller/src/views/goods/goods-seller/goodsOperationFirst.vue index bb06dbfb..64610159 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationFirst.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationFirst.vue @@ -19,17 +19,21 @@

返回

-
- -
-

{{ item.goodsName }}

-

{{ item.sellingPoint || "" }}

-
+
+ +
+ +
+

{{ item.goodsName }}

+

{{ item.sellingPoint || "" }}

+
+
+
@@ -133,9 +137,29 @@ export default { categoryListLevel2: [], /** 3级分类列表*/ categoryListLevel3: [], + searchParams: { + saveType: "TEMPLATE", + sort: "create_time", + order: "desc", + pageSize: 10, + pageNumber: 1, + }, + templateTotal:0, }; }, methods: { + // 商品模版触底加载 + handleReachBottom() { + setTimeout(() => { + if ( + this.searchParams.pageNumber * this.searchParams.pageSize <= + this.templateTotal + ) { + this.searchParams.pageNumber++; + this.GET_GoodsTemplate(); + } + }, 1000); + }, // 点击商品类型 handleClickGoodsType(val) { this.goodsTypeWay.map((item) => { @@ -159,14 +183,10 @@ export default { }, // 获取商品模板 GET_GoodsTemplate() { - let searchParams = { - saveType: "TEMPLATE", - sort: "create_time", - order: "desc", - }; - API_GOODS.getDraftGoodsListData(searchParams).then((res) => { + API_GOODS.getDraftGoodsListData(this.searchParams).then((res) => { if (res.success) { - this.goodsTemplates = res.result.records; + this.goodsTemplates.push(...res.result.records) + this.templateTotal = res.result.total } }); }, @@ -217,7 +237,10 @@ export default { if (this.selectedTemplate.id) { this.$emit("change", { tempId: this.selectedTemplate.id }); } else { - this.$emit("change", { category: this.category, goodsType: this.goodsType }); + this.$emit("change", { + category: this.category, + goodsType: this.goodsType, + }); } } }, @@ -229,4 +252,7 @@ export default {