Commit 30340fff by linjinhong

fix:添加播种墙图片兼容

parent f538ce7d
......@@ -516,7 +516,16 @@ const renderItemBox = (bool: boolean) => {
if (el.productMark === 'custom_normal' || el.productMark === 'normal') {
el.previewImgs = [{ url: el.variantImage || '' }]
} else {
el.previewImgs = JSON.parse(el.imageAry || '[]')
try {
el.previewImgs = JSON.parse(el.imageAry || '[]')
} catch {
console.log('生产订单:', el)
// 只有是有效URL才创建对象
el.previewImgs = el.imageAry?.startsWith?.('http')
? [{ url: el.imageAry, sort: 1, title: '正' }]
: []
}
}
}
})
......
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