Commit 6d891159 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 商品规格数据异常图片显示异常处理

parent e9b01b87
......@@ -691,7 +691,7 @@ const viewProducts: React.FC<{}> = () => {
{/* 没有价格属性默认一行直接显示图片 */}
<div className={styles.productImgBox}>
{
productDetail?.unitPriceAndPicList[0].commodityPic.length > 0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
productDetail?.unitPriceAndPicList?.length && productDetail?.unitPriceAndPicList[0].commodityPic.length > 0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
<Image
key={index}
width={104}
......
......@@ -648,7 +648,7 @@ const viewProducts: React.FC<{}> = () => {
{/* 没有价格属性默认一行直接显示图片 */}
<div className={styles.productImgBox}>
{
productDetail?.unitPriceAndPicList[0].commodityPic.length>0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
productDetail?.unitPriceAndPicList?.length && productDetail?.unitPriceAndPicList[0].commodityPic.length>0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
<Image
key={index}
className={styles.imgItem}
......
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