BUG修改

This commit is contained in:
a0049873 2022-08-10 15:47:29 +08:00
parent b99ec35e90
commit dc1b55de29
1 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,7 @@
class="algorithm-card"
>
<a-image
:src="algorithmCardPhoto(item.infoList)"
:src="algorithmCardPhoto(item.infoList, item)"
:width="525"
:height="275"
:fallback="imgSrc"
@ -55,9 +55,15 @@
}
pageWithAttrsFunction()
//
const algorithmCardPhoto = (List) => {
const algorithmCardPhoto = (List, item) => {
let obj = List.filter((item) => item.attrType === '应用场景')[0]
if (obj && obj.attrValue != '') {
console.log(
item.name,
item.id,
obj.attrValue,
'----------------------------'
)
obj = JSON.parse(obj.attrValue)[0].img
}
return obj || ''