Commit 1bf2485b authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 商品保存草稿兼容货品和商品描述为null的情况

parent 4699cd5b
......@@ -48,9 +48,9 @@ const ProductDescFormYang: React.FC<{}> = () => {
setFileImageList(() => {
const images = productInfoByEdit.commodityRemark?.imageList
return {
descriptionImages: images.filter(item => item.imageType === CommodityImagesType.DESCRIPTION_IMAGES),
certificationImages: images.filter(item => item.imageType === CommodityImagesType.CERTIFICATION_IMAGES),
reportImages: images.filter(item => item.imageType === CommodityImagesType.REPORT_IMAGES)
descriptionImages: images ? images.filter(item => item.imageType === CommodityImagesType.DESCRIPTION_IMAGES) : [],
certificationImages: images ? images.filter(item => item.imageType === CommodityImagesType.CERTIFICATION_IMAGES) : [],
reportImages: images ? images.filter(item => item.imageType === CommodityImagesType.REPORT_IMAGES) : [],
}
})
setVideoList(productInfoByEdit.commodityRemark?.video)
......
......@@ -42,7 +42,7 @@ const SelectGoodsForm: React.FC<{}> = (props) => {
item[next.id] = next;
return item
}, {}))
const filterGoods = goodsArr.filter(item => item['id'] !== 0)
const filterGoods = goodsArr ? goodsArr.filter(item => item['id'] !== 0) : []
if (filterGoods?.length > 0) {
setIsChecked(true)
setIsSelectGoods(true)
......
......@@ -216,7 +216,7 @@ const Products: React.FC<{}> = () => {
title: intl.formatMessage({ id: 'commodity.products.columns.name' }),
dataIndex: ['draft', 'name'],
key: 'name',
className: 'commonPickColor',
// className: 'commonPickColor',
width: 240,
ellipsis: true,
// render: (text: any, record: any) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.id}`}>
......
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