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 }