From 5132d3ec60e9760014e9f5492028050fa15a4cfb Mon Sep 17 00:00:00 2001 From: guoyue Date: Wed, 26 Oct 2022 20:10:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=97=E6=B3=95=E5=B9=BF=E5=9C=BA=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/capacitySquare/components/algorithm.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/front/src/views/capacitySquare/components/algorithm.vue b/front/src/views/capacitySquare/components/algorithm.vue index 31cd8157..9a63f367 100644 --- a/front/src/views/capacitySquare/components/algorithm.vue +++ b/front/src/views/capacitySquare/components/algorithm.vue @@ -101,7 +101,10 @@ pageWithAttrsFunction() //图片显示 const algorithmCardPhoto = (item) => { - let _arr = item.pic && JSON.parse(item.pic) + let _arr = [] + if(item.pic && typeof item.pic == 'string') { + _arr = JSON.parse(item.pic) + } let _img = _arr[0] && _arr[0].img || '' return _img }