Commit 90d6fd15 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 商品详情添加厂商/商品资质图片

parent c0ecbd1a
......@@ -771,16 +771,30 @@ const viewProducts: React.FC<{}> = () => {
{
productDetail?.commodityRemark?.imageList?.length > 0 &&
<div className={styles.descriptionBox}>
<div>
<p>商品图片:</p>
{
productDetail?.commodityRemark?.imageList.map((_item, _index) => _item &&
<Image
key={_index}
width={180}
src={_item['url']}
alt="商品图片描述"
className={styles.imgItem}
/>)
productDetail?.commodityRemark?.imageList.filter(item => item.imageType === 1).map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item.url} />
</div>)
}
</div>
<div>
<p>厂商资质图片:</p>
{
productDetail?.commodityRemark?.imageList.filter(item => item.imageType === 2).map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item.url} />
</div>)
}
</div>
<div>
<p>商品检测报告:</p>
{
productDetail?.commodityRemark?.imageList.filter(item => item.imageType === 3).map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item.url} />
</div>)
}
</div>
</div>
}
{
......
......@@ -134,6 +134,10 @@
border:1px solid rgba(235,236,240,1);
display: flex;
justify-content: left;
flex-direction: column;
& > div {
display: flex;
}
.imgItem{
width:180px;
height:180px;
......
......@@ -728,16 +728,30 @@ const viewProducts: React.FC<{}> = () => {
{
productDetail?.commodityRemark?.imageList?.length>0 &&
<div className={styles.descriptionBox}>
<div>
<p>商品图片:</p>
{
productDetail?.commodityRemark?.imageList.map((_item, _index)=> _item &&
<Image
key={_index}
width={180}
src={_item['url']}
alt="商品图片描述"
className={styles.imgItem}
/>)
productDetail?.commodityRemark?.imageList.filter(item => item.imageType === 1).map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item.url} />
</div>)
}
</div>
<div>
<p>厂商资质图片:</p>
{
productDetail?.commodityRemark?.imageList.filter(item => item.imageType === 2).map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item.url} />
</div>)
}
</div>
<div>
<p>商品检测报告:</p>
{
productDetail?.commodityRemark?.imageList.filter(item => item.imageType === 3).map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item.url} />
</div>)
}
</div>
</div>
}
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment