From c097a423f9e35974da56284169e3c06f2837ae5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?= <17633066053@163.com> Date: Tue, 4 Apr 2023 16:07:22 +0800 Subject: [PATCH] =?UTF-8?q?style:=20:zap:=20=E5=90=8E=E7=AB=AFES=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E=E6=A0=BC=E5=BC=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E5=89=8D=E7=AB=AF=E5=AD=97=E6=AE=B5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-goods-list/common.vue | 4 +-- components/m-goods-list/list.vue | 44 +++++++++++++------------- components/m-goods-recommend/index.vue | 4 +-- pages/navigation/search/searchPage.vue | 10 +++--- pages/product/goods.vue | 4 +-- pages/product/product/shop/-shop.vue | 8 ++--- pages/tabbar/user/similarGoods.vue | 14 ++++---- 7 files changed, 44 insertions(+), 44 deletions(-) diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue index 4896ace..c4cdc56 100644 --- a/components/m-goods-list/common.vue +++ b/components/m-goods-list/common.vue @@ -51,13 +51,13 @@ // 跳转到商品详情 navigateToDetailPage(item) { uni.navigateTo({ - url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}`, + url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`, }); }, // 跳转地址 navigateToStoreDetailPage(item) { uni.navigateTo({ - url: `/pages/product/shopPage?id=${item.content.storeId}`, + url: `/pages/product/shopPage?id=${item.storeId}`, }); }, }, diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue index d858315..4291c64 100644 --- a/components/m-goods-list/list.vue +++ b/components/m-goods-list/list.vue @@ -4,24 +4,24 @@ - + -
-
- ¥{{ $options.filters.goodsFormatPrice(item.content.price )[0] }} .{{ - $options.filters.goodsFormatPrice(item.content.price )[1] +
+ ¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{ + $options.filters.goodsFormatPrice(item.price )[1] }}
-
+
@@ -31,14 +31,14 @@
- 已售 {{ item.content.buyCount || "0" }} - {{ item.content.commentNum || "0" }}条评论 + 已售 {{ item.buyCount || "0" }} + {{ item.commentNum || "0" }}条评论
- {{ item.content.storeName || "暂无" }} + {{ item.storeName || "暂无" }}
@@ -52,21 +52,21 @@
- +
-
{{ item.content.goodsName }}
+
{{ item.goodsName }}
-
- ¥{{ $options.filters.goodsFormatPrice(item.content.price )[0] }} .{{ - $options.filters.goodsFormatPrice(item.content.price )[1] +
+ ¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{ + $options.filters.goodsFormatPrice(item.price )[1] }}
-
+
@@ -76,14 +76,14 @@
- 已售 {{ item.content.buyCount || '0' }} - {{ item.content.commentNum || '0' }}条评论 + 已售 {{ item.buyCount || '0' }} + {{ item.commentNum || '0' }}条评论
- {{ item.content.storeName }} + {{ item.storeName }} 进店
@@ -179,8 +179,8 @@ }, // 数据去重一下 只显示一次 减免 劵 什么的 getPromotion(item) { - if (item.content ? item.content.promotionMap : item.promotionMap) { - const fieldList = item.content ? item.content.promotionMap : item.promotionMap + if (item ? item.promotionMap : item.promotionMap) { + const fieldList = item ? item.promotionMap : item.promotionMap let array = []; Object.keys(fieldList).forEach((child) => { if (!array.includes(child.split("-")[0])) { @@ -193,13 +193,13 @@ // 跳转到商品详情 navigateToDetailPage(item) { uni.navigateTo({ - url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}`, + url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`, }); }, // 跳转地址 navigateToStoreDetailPage(item) { uni.navigateTo({ - url: `/pages/product/shopPage?id=${item.content.storeId}`, + url: `/pages/product/shopPage?id=${item.storeId}`, }); }, } diff --git a/components/m-goods-recommend/index.vue b/components/m-goods-recommend/index.vue index 8f60967..5b18b18 100644 --- a/components/m-goods-recommend/index.vue +++ b/components/m-goods-recommend/index.vue @@ -59,11 +59,11 @@ export default { } }); let goodsList = await getGoodsList(submit); - this.goodsList.push(...goodsList.data.result.content); + this.goodsList.push(...goodsList.data.result.records); }, handleClick(item) { uni.navigateTo({ - url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}`, + url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`, }); }, }, diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue index dc1aa94..52b1edc 100644 --- a/pages/navigation/search/searchPage.vue +++ b/pages/navigation/search/searchPage.vue @@ -493,13 +493,13 @@ export default { // 跳转到商品详情 navigateToDetailPage(item) { uni.navigateTo({ - url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}` + url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}` }); }, // 跳转地址 navigateToStoreDetailPage(item) { uni.navigateTo({ - url: `/pages/product/shopPage?id=${item.content.storeId}` + url: `/pages/product/shopPage?id=${item.storeId}` }); }, loadmore() { @@ -627,14 +627,14 @@ export default { } //没有更多直接返回 #TODO let goodsList = await getGoodsList(this.params); - - if (goodsList.data.result.content.length < 10) { + if (goodsList.data.result.records.length < 10) { this.loadingType = 'noMore'; this.empty = true; } else { this.empty = false; } - this.goodsList.push(...goodsList.data.result.content); + this.goodsList.push(...goodsList.data.result.records); + this.initSortGoods(); uni.hideLoading(); }, diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 72e7047..9d8cd0b 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -759,7 +759,7 @@ export default { storeId: this.goodsDetail.storeId, recommend: true, }).then((res) => { - this.recommendList = res.data.result.content; + this.recommendList = res.data.result.records; }); }, @@ -774,7 +774,7 @@ export default { category: this.goodsDetail.categoryId, keyword: this.goodsDetail.name, }).then((res) => { - this.likeGoodsList = res.data.result.content; + this.likeGoodsList = res.data.result.records; }); }, diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue index cf4ab41..5ba015e 100644 --- a/pages/product/product/shop/-shop.vue +++ b/pages/product/product/shop/-shop.vue @@ -24,15 +24,15 @@ 商品推荐 - + 加载失败 - {{ item.content.goodsName }} + {{ item.goodsName }} - ¥{{ $options.filters.goodsFormatPrice(item.content.price)[0] }}.{{ $options.filters.goodsFormatPrice(item.content.price)[1] }} + ¥{{ $options.filters.goodsFormatPrice(item.price)[0] }}.{{ $options.filters.goodsFormatPrice(item.price)[1] }} @@ -51,7 +51,7 @@ export default { // 点击商品 clickGoods(val) { uni.navigateTo({ - url: `/pages/product/goods?id=${val.content.id}&goodsId=${val.content.goodsId}`, + url: `/pages/product/goods?id=${val.id}&goodsId=${val.goodsId}`, }); }, diff --git a/pages/tabbar/user/similarGoods.vue b/pages/tabbar/user/similarGoods.vue index b182475..fe15f8b 100644 --- a/pages/tabbar/user/similarGoods.vue +++ b/pages/tabbar/user/similarGoods.vue @@ -13,17 +13,17 @@ 没有相似商品 - - {{item.content.name}} + + {{item.name}} - ¥{{item.content.price | unitPrice}} + ¥{{item.price | unitPrice}} - ¥{{item.content.mktprice}} + ¥{{item.mktprice}} - 已售{{item.content.buy_count}}件 - {{item.content.grade}}%好评 + 已售{{item.buy_count}}件 + {{item.grade}}%好评 @@ -74,7 +74,7 @@ }, goDetail(item) { uni.navigateTo({ - url: '/pages/product/goods?id=' + item.content.id + "&goodsId=" +item.content.goodsId + url: '/pages/product/goods?id=' + item.id + "&goodsId=" +item.goodsId }) }, loadData() {