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() {