Commit c2588f47 by linjinhong

修改卡片列表图片展示

parent 8ce0d1e0
...@@ -1375,7 +1375,7 @@ ...@@ -1375,7 +1375,7 @@
<div <div
v-for="(item, index) in JSON.parse( v-for="(item, index) in JSON.parse(
cardItem.imageAry || '', cardItem.imageAry || '',
)" )?.filter((el: { title: string }) => el.title)||[]"
:key="index" :key="index"
:title="item.title" :title="item.title"
class="item-image" class="item-image"
...@@ -2696,7 +2696,10 @@ watch( ...@@ -2696,7 +2696,10 @@ watch(
order.productList?.forEach((product) => { order.productList?.forEach((product) => {
if (!product.previewImgs && product.imageAry) { if (!product.previewImgs && product.imageAry) {
try { try {
product.previewImgs = JSON.parse(product.imageAry) product.previewImgs =
JSON.parse(product.imageAry)?.filter(
(el: { title: string }) => el.title,
) || []
} catch (error) { } catch (error) {
console.error('JSON解析失败:', error) console.error('JSON解析失败:', error)
product.previewImgs = [] product.previewImgs = []
......
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