fix:算法广场和GIS广场图片bug
This commit is contained in:
parent
fef67d9cc4
commit
355ee77e79
|
@ -31,8 +31,8 @@
|
|||
|
||||
<div class="algorithm-class">
|
||||
<div v-for="(item, index) in dataList" :key="`algorithm-${index}`" class="algorithm-card">
|
||||
<a-image :src="algorithmCardPhoto(item.infoList, item)" :width="525" :height="275" :fallback="imgSrc"
|
||||
:preview="false"></a-image>
|
||||
<a-image :src="algorithmCardPhoto(item)" :width="525" :height="275" :fallback="imgSrc" :preview="false">
|
||||
</a-image>
|
||||
|
||||
<a-tooltip>
|
||||
<template #title>{{ item.name }}</template>
|
||||
|
@ -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) => {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div class="algorithm-class">
|
||||
<div v-for="(item, index) in dataList" :key="`algorithm-${index}`" class="algorithm-card">
|
||||
<a-image :src="algorithmCardPhoto(item.infoList)" :width="525" :height="275" :fallback="imgSrc"
|
||||
<a-image :src="item.pic" :width="525" :height="275" :fallback="imgSrc"
|
||||
:preview="false"></a-image>
|
||||
|
||||
<a-tooltip>
|
||||
|
@ -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}`)
|
||||
|
|
Loading…
Reference in New Issue