|
@@ -148,14 +148,14 @@ function renderHtml(data, pre, parentSelector) {
|
|
|
'<img title="' + obj.title + '" src="' + (obj.titlepic == null || obj.titlepic.length < 1 ? '../img/testImg.png' : obj.titlepic) + '">' +
|
|
|
'</div>';*/
|
|
|
|
|
|
- swiperHtml += '<div data-id="' + obj.id + '" class="swiper-slide"><img title="' + obj.title + '" src="' + (obj.titlepic == null ? '../img/testImg.png' : obj.titlepic) + '"></div>';
|
|
|
+ swiperHtml += '<div data-id="' + obj.id + '" class="swiper-slide"><img title="' + obj.title + '" src="' + (obj.titlepic == null || obj.titlepic == '' ? '../img/testImg.png' : obj.titlepic) + '"></div>';
|
|
|
swiperContent[i] = { cont1: obj.title, cont2: obj.summary || '暂无摘要' }
|
|
|
|
|
|
} else if (curr == 1 && i < 8) {
|
|
|
rightHtml += '<li data-id="' + obj.id + '">' +
|
|
|
'<h3 class="bt" title="' + obj.title + '">' + obj.title + '</h3>' +
|
|
|
'<div class="swiContent">' +
|
|
|
- '<img src="' + (obj.titlepic == null ? '../img/testImg.png' : obj.titlepic) + '" alt="新闻图片">' +
|
|
|
+ '<img src="' + (obj.titlepic == null || obj.titlepic == '' ? '../img/testImg.png' : obj.titlepic) + '" alt="新闻图片">' +
|
|
|
'<span>' + obj.summary + '</span>' +
|
|
|
'</div>' +
|
|
|
'</li>'
|