From 355ee77e7924a82e42d80e370898f2e0e204f2d3 Mon Sep 17 00:00:00 2001 From: guoyue Date: Wed, 26 Oct 2022 17:10:15 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=AE=97=E6=B3=95=E5=B9=BF?= =?UTF-8?q?=E5=9C=BA=E5=92=8CGIS=E5=B9=BF=E5=9C=BA=E5=9B=BE=E7=89=87bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/capacitySquare/components/algorithm.vue | 15 ++++++--------- .../src/views/capacitySquare/components/layer.vue | 13 ++----------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/front/src/views/capacitySquare/components/algorithm.vue b/front/src/views/capacitySquare/components/algorithm.vue index b8cdbf42..31cd8157 100644 --- a/front/src/views/capacitySquare/components/algorithm.vue +++ b/front/src/views/capacitySquare/components/algorithm.vue @@ -31,8 +31,8 @@
- + + @@ -100,13 +100,10 @@ const pageWithAttrsFunction = () => { pageWithAttrsFunction() //图片显示 -const algorithmCardPhoto = (List, item) => { - let _arr = List && item && List.filter((item) => item.attrType === '应用场景') || [] - let obj = _arr[0] - if (obj && obj.attrValue != '') { - obj = JSON.parse(obj.attrValue)[0].img - } - return obj || '' +const algorithmCardPhoto = (item) => { + let _arr = item.pic && JSON.parse(item.pic) + let _img = _arr[0] && _arr[0].img || '' + return _img } //跳转详情页 const detailFunction = (id) => { diff --git a/front/src/views/capacitySquare/components/layer.vue b/front/src/views/capacitySquare/components/layer.vue index c76838c1..f7facca0 100644 --- a/front/src/views/capacitySquare/components/layer.vue +++ b/front/src/views/capacitySquare/components/layer.vue @@ -30,7 +30,7 @@
- @@ -96,16 +96,7 @@ const pageWithAttrsFunction = () => { }) } pageWithAttrsFunction() -//图片显示 -const algorithmCardPhoto = (List = []) => { - let url = '' - List.map((item) => { - if (item.attrType === '图层缩略图') { - url = item.attrValue - } - }) - return url -} + //跳转详情页 const detailFunction = (id) => { window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)