修改无图片显示

master
ELF 5 years ago
parent a0cfee5466
commit beae17d518

@ -586,13 +586,15 @@
function isImg(src) { function isImg(src) {
var img = new Image(); var img = new Image();
img.src = src; img.src = src;
return true; if (img.fileSize > 0) {
return true
}
return false
} }
function getGameLogo(obj) { function getGameLogo(obj) {
var logo = null; var logo = null;
var logoSrc = $(obj).parents('.game-li').eq(0).find('.img-box').children('img').attr('src'); var logoSrc = $(obj).parents('.game-li').eq(0).find('.img-box').children('img').attr('src');
console.log(isImg(logoSrc))
if (isImg(logoSrc)) { if (isImg(logoSrc)) {
logo = $(obj).parents('.game-li').eq(0).find('.img-box').children('img')[0] logo = $(obj).parents('.game-li').eq(0).find('.img-box').children('img')[0]
} else { } else {

Loading…
Cancel
Save