style: 后端ES接口返回格式调整,前端字段调整

This commit is contained in:
学习很差啦
2023-04-04 16:07:22 +08:00
parent f0dcf473e8
commit c097a423f9
7 changed files with 44 additions and 44 deletions

View File

@@ -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;
});
},

View File

@@ -24,15 +24,15 @@
<view class="store-recommend-title">商品推荐</view>
<view class="recommend-list">
<view class="recommend-item" @click="clickGoods(item)" v-for="(item, index) in res" :key="index">
<u-image class="recommend-item-img" :fade="true" duration="450" :lazy-load="true" :src="item.content.thumbnail" height="218rpx">
<u-image class="recommend-item-img" :fade="true" duration="450" :lazy-load="true" :src="item.thumbnail" height="218rpx">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx; ">加载失败</view>
</u-image>
<view class="recommend-item-name">
{{ item.content.goodsName }}
{{ item.goodsName }}
</view>
<view class="item-price" v-if="item.price != undefined">
<span class="item-price-blod">{{ $options.filters.goodsFormatPrice(item.content.price)[0] }}</span>.{{ $options.filters.goodsFormatPrice(item.content.price)[1] }}
<span class="item-price-blod">{{ $options.filters.goodsFormatPrice(item.price)[0] }}</span>.{{ $options.filters.goodsFormatPrice(item.price)[1] }}
</view>
</view>
</view>
@@ -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}`,
});
},