算法广场兼容

This commit is contained in:
guoyue 2022-10-26 20:10:06 +08:00
parent b61722857d
commit 5132d3ec60
1 changed files with 4 additions and 1 deletions

View File

@ -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
}