Commit 65ed174f authored by GuanHua's avatar GuanHua

fix: 商品没有属性时页面报错问题

parent 0b6a43e4
...@@ -709,8 +709,10 @@ const CommodityDetail = (props) => { ...@@ -709,8 +709,10 @@ const CommodityDetail = (props) => {
} }
} }
} }
if(unitPricePicList.lenght > 0) {
setCurrentPriceRange(sortUnitPrice(unitPricePicList[0].unitPrice)) setCurrentPriceRange(sortUnitPrice(unitPricePicList[0].unitPrice))
initStockCount(unitPricePicList) initStockCount(unitPricePicList)
}
// setStockCount(unitPricePicList[0].stockCount) // setStockCount(unitPricePicList[0].stockCount)
setCommodityImgList(tempImgList) setCommodityImgList(tempImgList)
setAttributeList(tempAttrList) setAttributeList(tempAttrList)
......
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