|
@@ -118,12 +118,12 @@
|
|
|
<div class="goods-bos" v-for="(item, index) in goodsList" :key="index">
|
|
<div class="goods-bos" v-for="(item, index) in goodsList" :key="index">
|
|
|
<img class="goods-main" :src="item.mainImg" alt="" />
|
|
<img class="goods-main" :src="item.mainImg" alt="" />
|
|
|
<div class="goods-box">
|
|
<div class="goods-box">
|
|
|
- <div v-for="(item1, index1) in 8" :key="index1" class="goods-list">
|
|
|
|
|
- <img class="goods-img" :src="item.productImage ? item.productImage.split(',')[0] : ''" alt="" />
|
|
|
|
|
- <div class="goods-name ellipsis2">{{ item.name || '' }}</div>
|
|
|
|
|
|
|
+ <div v-for="(item1, index1) in item.goodsList" :key="index1" class="goods-list">
|
|
|
|
|
+ <img class="goods-img" :src="item1.productImage ? item1.productImage.split(',')[0] : ''" alt="" />
|
|
|
|
|
+ <div class="goods-name ellipsis2">{{ item1.itemName || '' }}</div>
|
|
|
<div class="goods-price">
|
|
<div class="goods-price">
|
|
|
- <span class="price1">¥{{ item.memberPrice || '' }}</span>
|
|
|
|
|
- <span class="price2">¥{{ item.marketPrice || '' }}</span>
|
|
|
|
|
|
|
+ <span class="price1">¥{{ item1.memberPrice || '' }}</span>
|
|
|
|
|
+ <span class="price2">¥{{ item1.marketPrice || '' }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -256,22 +256,40 @@ getHotCustomGiftFloorList({}).then((res) => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
//循环
|
|
//循环
|
|
|
-getAdvertisementGiftFloorList({}).then((res) => {
|
|
|
|
|
|
|
+getAdvertisementGiftFloorList({}).then(async (res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- goodsList.value = res.data;
|
|
|
|
|
- res.data.forEach((item: any) => {
|
|
|
|
|
- getGiftFloorLinkProductList({ floorId: item.id }).then((res) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
|
|
+ for (const item of res.data) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const datas2 = await getGiftFloorLinkProductList({ floorId: item.id });
|
|
|
|
|
+ if (datas2.code == 200) {
|
|
|
|
|
+ item.goodsList = datas2.data;
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ } catch (error) {}
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ goodsList.value = res.data;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+// getAdvertisementGiftFloorList({}).then((res) => {
|
|
|
|
|
+// if (res.code == 200) {
|
|
|
|
|
+// goodsList.value = res.data;
|
|
|
|
|
+// res.data.forEach((item: any) => {
|
|
|
|
|
+// getGiftFloorLinkProductList({ floorId: item.id }).then((res) => {
|
|
|
|
|
+// if (res.code == 200) {
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// });
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
|
|
|
//为你推荐
|
|
//为你推荐
|
|
|
getRecommendGiftFloorList({}).then((res) => {
|
|
getRecommendGiftFloorList({}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- recommend.value = res.data;
|
|
|
|
|
|
|
+ getGiftFloorLinkProductList({floorId:res.data[0].id}).then((res1) => {
|
|
|
|
|
+ if (res1.code == 200) {
|
|
|
|
|
+ recommend.value = res1.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|