更新一下截图的获取方式

This commit is contained in:
luchenqun 2017-03-17 13:00:09 +08:00
parent b44b841241
commit e3d7c8b637
1 changed files with 11 additions and 1 deletions

View File

@ -1074,7 +1074,17 @@ api.getHotBookmarksByTimer = function() {
bookmark.created_at = b.updatetime > b.createtime ? b.createtime : b.updatetime;
bookmark.last_click = b.updatetime < b.createtime ? b.createtime : b.updatetime;
if (b.imageList.length >= 1) {
bookmark.snap_url = (data.pageNo == 1 ? (b.imageList[0].url.match(alterRex) != null ? defaultSnap : b.imageList[0].url) : defaultSnap);
if (b.imageList[0].url) {
bookmark.snap_url = (data.pageNo == 1 ? (b.imageList[0].url.match(alterRex) != null ? defaultSnap : b.imageList[0].url) : defaultSnap);
} else {
bookmark.snap_url = defaultSnap;
for (var i = 0; i < b.images.length; i++) {
if (b.images[i]) {
bookmark.snap_url = b.images[i];
break;
}
}
}
} else {
bookmark.snap_url = defaultSnap;
}