');
var preBtn = isEnglishMode ?
$('
Pre') :
$('
【上一页】');
var nextBtn = isEnglishMode ?
$('
Next') :
$('
【下一页】');
if (r.totalPages > 0) {
if (r.currentPage == 1 && r.totalPages != 1) {
nextBtn.attr('page-index', r.currentPage + 1);
buttonContainer.append(nextBtn);
buttonContainer.append(' ');
} else if (r.currentPage == r.totalPages && r.totalPages != 1) {
preBtn.attr('page-index', r.currentPage - 1);
buttonContainer.append(preBtn);
buttonContainer.append(' ');
} else if (r.currentPage != 1 && r.totalPages > r.currentPage) {
preBtn.attr('page-index', r.currentPage - 1);
buttonContainer.append(preBtn);
buttonContainer.append(" ");
nextBtn.attr('page-index', r.currentPage + 1);
buttonContainer.append(nextBtn);
buttonContainer.append(" ");
}
}
pagerTd = $('
| ');
pagerTd.append(buttonContainer);
}
//不分页时渲染"更多"按钮
if(!isPager && isDispMoreButton){
var buttonContainer = $('
');
var moreBtn = $('
' + moreButtonDetail + '');
buttonContainer.append(moreBtn);
buttonContainer.append(" ");
pagerTd = $('
| ');
pagerTd.append(buttonContainer);
}
}else{
// 如果返回的数据不存在,则添加提示
pagerTd=$('
当前频道没有记录! | ');
}
pagerContainer.append(pagerTd);
container.append(pagerContainer);
container.find('tr:last').on('click', function(e) {
var page = $(e.target).attr('page-index');
loadPostings(page);
});
}
// 正常模式的分页请求
var url = (window.location.protocol == "about:" ? "http://" : "//") + window.appConfig.papi.host + "/cmspage/columns/webpart/webservice/channelSummaryList";
var cookies = document.cookie.split(';');
var cisCode = utils.getCookieByCis(cookies,"cisCode");
var groupList = utils.getCookieByCis(cookies,"groupList");
function loadPostings(page) {
$("#655b16a9baa7714998c8f5cf36737453 .tableloading").show();
$("#655b16a9baa7714998c8f5cf36737453 .tableloading").html("
正在加载中... | ");
$.ajax({
url: url,
data: {
cisCode: cisCode || "",
customerGroupNoList: groupList ? JSON.parse(groupList).join(",") : "",
isBindGroup: true,
currentColumnId: currentColumnId,
summaryColumnId: summaryColumnId,
displayTopPostings: isPager ? 0 : disptoprecordnum,
needDisplayChildrenPostings: needDisplayChildrenPostings,
author: author,
enablePager: isPager,
page: page,
size: size,
isUseDomain:false,
domainName:domainName||"",
},
success: function(r) {
if (r.data) {
$("#655b16a9baa7714998c8f5cf36737453 .tableloading").hide();
displayPostingsAndPager(r.data);
}else{
$("#655b16a9baa7714998c8f5cf36737453 .tableloading").html("
当前频道没有记录! | ");
}
},
error: function() {
$("#655b16a9baa7714998c8f5cf36737453 .tableloading").html("
加载失败,请稍后再试! | ");
}
});
}
loadPostings(1);
});
');
var preBtn = isEnglishMode ?
$('
Pre') :
$('
【上一页】');
var nextBtn = isEnglishMode ?
$('
Next') :
$('
【下一页】');
if (r.totalPages > 0) {
if (r.currentPage == 1 && r.totalPages != 1) {
nextBtn.attr('page-index', r.currentPage + 1);
buttonContainer.append(nextBtn);
buttonContainer.append(' ');
} else if (r.currentPage == r.totalPages && r.totalPages != 1) {
preBtn.attr('page-index', r.currentPage - 1);
buttonContainer.append(preBtn);
buttonContainer.append(' ');
} else if (r.currentPage != 1 && r.totalPages > r.currentPage) {
preBtn.attr('page-index', r.currentPage - 1);
buttonContainer.append(preBtn);
buttonContainer.append(" ");
nextBtn.attr('page-index', r.currentPage + 1);
buttonContainer.append(nextBtn);
buttonContainer.append(" ");
}
}
pagerTd = $('
| ');
pagerTd.append(buttonContainer);
}
//不分页时渲染"更多"按钮
if(!isPager && isDispMoreButton){
var buttonContainer = $('
');
var moreBtn = $('
' + moreButtonDetail + '');
buttonContainer.append(moreBtn);
buttonContainer.append(" ");
pagerTd = $('
| ');
pagerTd.append(buttonContainer);
}
}else{
// 如果返回的数据不存在,则添加提示
pagerTd=$('
当前频道没有记录! | ');
}
pagerContainer.append(pagerTd);
container.append(pagerContainer);
container.find('tr:last').on('click', function(e) {
var page = $(e.target).attr('page-index');
loadPostings(page);
});
}
// 正常模式的分页请求
var url = (window.location.protocol == "about:" ? "http://" : "//") + window.appConfig.papi.host + "/cmspage/columns/webpart/webservice/channelSummaryList";
var cookies = document.cookie.split(';');
var cisCode = utils.getCookieByCis(cookies,"cisCode");
var groupList = utils.getCookieByCis(cookies,"groupList");
function loadPostings(page) {
$("#44ddfe711997bddde527c23f50577596 .tableloading").show();
$("#44ddfe711997bddde527c23f50577596 .tableloading").html("
正在加载中... | ");
$.ajax({
url: url,
data: {
cisCode: cisCode || "",
customerGroupNoList: groupList ? JSON.parse(groupList).join(",") : "",
isBindGroup: true,
currentColumnId: currentColumnId,
summaryColumnId: summaryColumnId,
displayTopPostings: isPager ? 0 : disptoprecordnum,
needDisplayChildrenPostings: needDisplayChildrenPostings,
author: author,
enablePager: isPager,
page: page,
size: size,
isUseDomain:false,
domainName:domainName||"",
},
success: function(r) {
if (r.data) {
$("#44ddfe711997bddde527c23f50577596 .tableloading").hide();
displayPostingsAndPager(r.data);
}else{
$("#44ddfe711997bddde527c23f50577596 .tableloading").html("
当前频道没有记录! | ");
}
},
error: function() {
$("#44ddfe711997bddde527c23f50577596 .tableloading").html("
加载失败,请稍后再试! | ");
}
});
}
loadPostings(1);
});
');
if (r.totalPages > 0) {
if (r.currentPage == 1 && r.totalPages != 1) {
nextBtn.attr('page-index', r.currentPage + 1);
buttonContainer.append(nextBtn);
buttonContainer.append(' ');
} else if (r.currentPage == r.totalPages && r.totalPages != 1) {
preBtn.attr('page-index', r.currentPage - 1);
buttonContainer.append(preBtn);
buttonContainer.append(' ');
} else if (r.currentPage != 1 && r.totalPages > r.currentPage) {
preBtn.attr('page-index', r.currentPage - 1);
buttonContainer.append(preBtn);
buttonContainer.append(" ");
nextBtn.attr('page-index', r.currentPage + 1);
buttonContainer.append(nextBtn);
buttonContainer.append(" ");
}
}
pagerTd = $('
');
pagerTd.append(buttonContainer);
}
//不分页时渲染"更多"按钮
if(!isPager && isDispMoreButton){
var buttonContainer = $('
');
buttonContainer.append(moreBtn);
buttonContainer.append(" ");
pagerTd = $('
');
pagerTd.append(buttonContainer);
}
}else{
// 如果返回的数据不存在,则添加提示
pagerTd=$('
');
}
pagerContainer.append(pagerTd);
container.append(pagerContainer);
container.find('tr:last').on('click', function(e) {
var page = $(e.target).attr('page-index');
loadPostings(page);
});
}
// 正常模式的分页请求
var url = (window.location.protocol == "about:" ? "http://" : "//") + window.appConfig.papi.host + "/cmspage/columns/webpart/webservice/channelSummaryList";
var cookies = document.cookie.split(';');
var cisCode = utils.getCookieByCis(cookies,"cisCode");
var groupList = utils.getCookieByCis(cookies,"groupList");
function loadPostings(page) {
$("#14cae40f0baad724d67d5d455e6b3be1 .tableloading").show();
$("#14cae40f0baad724d67d5d455e6b3be1 .tableloading").html("
");
$.ajax({
url: url,
data: {
cisCode: cisCode || "",
customerGroupNoList: groupList ? JSON.parse(groupList).join(",") : "",
isBindGroup: true,
currentColumnId: currentColumnId,
summaryColumnId: summaryColumnId,
displayTopPostings: isPager ? 0 : disptoprecordnum,
needDisplayChildrenPostings: needDisplayChildrenPostings,
author: author,
enablePager: isPager,
page: page,
size: size,
isUseDomain:false,
domainName:domainName||"",
},
success: function(r) {
if (r.data) {
$("#14cae40f0baad724d67d5d455e6b3be1 .tableloading").hide();
displayPostingsAndPager(r.data);
}else{
$("#14cae40f0baad724d67d5d455e6b3be1 .tableloading").html("
");
}
},
error: function() {
$("#14cae40f0baad724d67d5d455e6b3be1 .tableloading").html("
");
}
});
}
loadPostings(1);
});