From 2f6e50cc1c0a951610667c58d19aec79ce6e7add Mon Sep 17 00:00:00 2001 From: misworga831 Date: Fri, 31 Mar 2023 17:14:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=82=E9=85=8D=E6=96=B0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=95=86=E5=93=81=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/GoodsList.vue | 28 +++++++++------------ buyer/src/pages/Merchant.vue | 47 +++++++++++++++++------------------ 2 files changed, 35 insertions(+), 40 deletions(-) diff --git a/buyer/src/pages/GoodsList.vue b/buyer/src/pages/GoodsList.vue index 0d454c22..15e1cc15 100644 --- a/buyer/src/pages/GoodsList.vue +++ b/buyer/src/pages/GoodsList.vue @@ -49,35 +49,35 @@ class="goods-show-info" v-for="(item, index) in goodsList" :key="index" - @click="goGoodsDetail(item.id, item.content.goodsId)" + @click="goGoodsDetail(item.id, item.goodsId)" >
- +
{{ - item.content.price | unitPrice("¥") + item.price | unitPrice("¥") }}
批发 - {{ item.content.goodsName }} + {{ item.goodsName }}
- 已有{{ item.content.commentNum || 0 }}{{ item.commentNum || 0 }}人评价
{{ - item.content.storeName + item.storeName }}
@@ -85,21 +85,21 @@ 自营 虚拟 实物 @@ -146,7 +146,6 @@ export default { ], goodsList: [], // 商品列表 loading: false, // 加载状态 - goodsListType: "", total: 0, // 列表总数 params: { // 请求参数 @@ -230,11 +229,8 @@ export default { .then((res) => { this.loading = false; if (res.success) { - this.goodsList = res.result.content; - this.total = res.result.totalElements; - for (var i = 0; i < this.goodsList.length; i++) { - this.goodsListType = this.goodsList[i]; - } + this.goodsList = res.result; + this.total = res.result.total; } }) .catch(() => { diff --git a/buyer/src/pages/Merchant.vue b/buyer/src/pages/Merchant.vue index 773d8ac8..621f3ad5 100644 --- a/buyer/src/pages/Merchant.vue +++ b/buyer/src/pages/Merchant.vue @@ -7,14 +7,14 @@ @@ -26,7 +26,7 @@ > 首页 -
  • +
  • {{ cate.labelName }} @@ -34,10 +34,10 @@
    {{ sec.labelName }} @@ -63,38 +63,38 @@
    - +
    {{ - item.content.price | unitPrice("¥") + item.price | unitPrice("¥") }}
    - {{ item.content.goodsName }} + {{ item.goodsName }}
    - 已有{{ item.content.commentNum || 0 }}{{ item.commentNum || 0 }}人评价
    @@ -107,15 +107,14 @@ -