Showing
1 changed file
with
6 additions
and
2 deletions
@@ -263,7 +263,7 @@ define('channel', function(require, exports) { | @@ -263,7 +263,7 @@ define('channel', function(require, exports) { | ||
263 | */ | 263 | */ |
264 | ({ | 264 | ({ |
265 | init: function() { | 265 | init: function() { |
266 | - var rightBanner = $("#right_banner_warp .right-banner")[0], | 266 | + var rightBanner = $(".right-banner")[0], |
267 | $banners = $(rightBanner).find(".image-box"), | 267 | $banners = $(rightBanner).find(".image-box"), |
268 | len = $banners.length, | 268 | len = $banners.length, |
269 | $pageContent = $("#content"), | 269 | $pageContent = $("#content"), |
@@ -562,10 +562,14 @@ define('channel', function(require, exports) { | @@ -562,10 +562,14 @@ define('channel', function(require, exports) { | ||
562 | var data = JSON.parse(dataString), | 562 | var data = JSON.parse(dataString), |
563 | elem = null; | 563 | elem = null; |
564 | 564 | ||
565 | + console.log(dataString); | ||
566 | + | ||
565 | data = method.formatData(data); | 567 | data = method.formatData(data); |
566 | elem = method.templateEngine(template, data); | 568 | elem = method.templateEngine(template, data); |
567 | $(domOption.parent).append(elem); | 569 | $(domOption.parent).append(elem); |
568 | 570 | ||
571 | + console.log($(domOption.parent)); | ||
572 | + | ||
569 | status.loadCount++; | 573 | status.loadCount++; |
570 | status.isPullingData = false; | 574 | status.isPullingData = false; |
571 | 575 | ||
@@ -634,7 +638,7 @@ define('channel', function(require, exports) { | @@ -634,7 +638,7 @@ define('channel', function(require, exports) { | ||
634 | }, | 638 | }, |
635 | 639 | ||
636 | domOption: { | 640 | domOption: { |
637 | - parent: "#content", | 641 | + parent: ".main-layout", |
638 | pagination: "#pageContent", | 642 | pagination: "#pageContent", |
639 | }, | 643 | }, |
640 | template: "<#for (var i = 0, len = data.length; i < len; i++) {#>" + "<div class=\"fluid-item layout-item tiled\">" + "<div class=\"image-box\">" + "<a href=\"/news/detail/id/<#data[i].id#>\" target=\"_blank\" title=\"<#data[i].title#>\">" + "<img src=\"<#data[i].thumb#>\" alt=\"\">" + "</a>" + "</div>" + "<div class=\"item-info\">" + "<a class=\"fluid-tag item-tag " + "<#switch (data[i].tag) {" + "case '品牌资讯':" + "#>brand-info<#" + "break;" + "case '活动介绍':" + "#>activity-intro<#" + "break;" + "case '亮点活动':" + "#>spotlight-activity<#" + "break;" + "case '限量商品':" + "#>limited-edition<#" + "break;" + "}#>\" href=\"/news/index/tag/<#data[i].tag#>\"><#data[i].tag#></a>" + "<span class=\"item-time\"><#data[i].create_time#></span>" + "</div>" + "<div class=\"content\">" + "<h2 class=\"volupia\">" + "<a href=\"/news/detail/id/<#data[i].id#>\" target=\"_blank\"><#data[i].title#></a>" + "</h2>" + "<p class=\"text-content\"><a href=\"/news/detail/id/<#data[i].id#>\" target=\"_blank\"><#data[i].content#></a></p>" + "</div>" + "</div>" + "<#}#>", | 644 | template: "<#for (var i = 0, len = data.length; i < len; i++) {#>" + "<div class=\"fluid-item layout-item tiled\">" + "<div class=\"image-box\">" + "<a href=\"/news/detail/id/<#data[i].id#>\" target=\"_blank\" title=\"<#data[i].title#>\">" + "<img src=\"<#data[i].thumb#>\" alt=\"\">" + "</a>" + "</div>" + "<div class=\"item-info\">" + "<a class=\"fluid-tag item-tag " + "<#switch (data[i].tag) {" + "case '品牌资讯':" + "#>brand-info<#" + "break;" + "case '活动介绍':" + "#>activity-intro<#" + "break;" + "case '亮点活动':" + "#>spotlight-activity<#" + "break;" + "case '限量商品':" + "#>limited-edition<#" + "break;" + "}#>\" href=\"/news/index/tag/<#data[i].tag#>\"><#data[i].tag#></a>" + "<span class=\"item-time\"><#data[i].create_time#></span>" + "</div>" + "<div class=\"content\">" + "<h2 class=\"volupia\">" + "<a href=\"/news/detail/id/<#data[i].id#>\" target=\"_blank\"><#data[i].title#></a>" + "</h2>" + "<p class=\"text-content\"><a href=\"/news/detail/id/<#data[i].id#>\" target=\"_blank\"><#data[i].content#></a></p>" + "</div>" + "</div>" + "<#}#>", |
-
Please register or login to post a comment