style:新闻动态列表的页面的修改
Showing
2 changed files
with
9 additions
and
3 deletions
... | @@ -49,11 +49,13 @@ function HotArticle() { | ... | @@ -49,11 +49,13 @@ function HotArticle() { |
49 | success: function (result) {//返回数据根据结果进行相应的处理 | 49 | success: function (result) {//返回数据根据结果进行相应的处理 |
50 | if (result.code == 200 && result.data != null) { | 50 | if (result.code == 200 && result.data != null) { |
51 | for (var i = 0; i < result.data.length; i++) { | 51 | for (var i = 0; i < result.data.length; i++) { |
52 | li = '<li class="tj">'; | 52 | li = '<li class="tj"><a href="./xwxq.html?id='+result.data[i].id+'" target="_blank">'; |
53 | li += '<img src="' + result.data[i].cover + '">'; | 53 | if ( result.data[i].cover ) { |
54 | li += '<img src="' + result.data[i].cover + '">'; | ||
55 | } | ||
54 | li += '<span class="tj-title">' + result.data[i].headline + '</span>'; | 56 | li += '<span class="tj-title">' + result.data[i].headline + '</span>'; |
55 | li += '<span class="tj-date">' + result.data[i].deadtime + '</span>'; | 57 | li += '<span class="tj-date">' + result.data[i].deadtime + '</span>'; |
56 | li += '</li>'; | 58 | li += '</a></li>'; |
57 | recommend.append(li); | 59 | recommend.append(li); |
58 | } | 60 | } |
59 | } | 61 | } | ... | ... |
-
Please register or sign in to post a comment