0) {
data += "&orderBy=" + orderBy;
}
if (sId != 0) {
data += "&sId=" + sId;
}
//上课校区
$('input[name="filterSchool"]:checked').each(function () {
data += "&filterSchool=" + $(this).val();
});
//适用人群
$('input[name="filterShiYongRen"]:checked').each(function () {
data += "&filterShiYongRen=" + $(this).val();
});
//上课天数
$('input[name="filterDays"]:checked').each(function () {
data += "&filterDays=" + $(this).val();
});
//上课人数
$('input[name="filterPeopleNum"]:checked').each(function () {
data += "&filterPeopleNum=" + $(this).val();
});
//上课班型
$('input[name="filterType"]:checked').each(function () {
data += "&filterType=" + $(this).val();
});
//目标分数
$('input[name="filterFenShu"]:checked').each(function () {
data += "&filterFenShu=" + $(this).val();
});
//阶段
$('input[name="filterJieDuan"]:checked').each(function () {
data += "&filterJieDuan=" + $(this).val();
});
//价格过滤
$('input[name="filterPrice"]:checked').each(function () {
data += "&filterPrice=" + $(this).val();
});
var end_time = $("#end_time").val();
if (end_time != "") {
data += "&endDate=" + end_time;
}
var begin_time = $("#begin_time").val();
if (begin_time != "") {
data += "&startDate=" + begin_time;
}
data += "&pId=" + pId;
data += "&cId=" + cId;
$.ajax({
type: "POST",
url: "/classTree.jspx",
data: data,
datatype: "json",
success: function (rsDate) {
var tabHtml = "";
tabHtml += "
";
tabHtml += "";
tabHtml += "";
tabHtml += "";
tabHtml += "";
tabHtml += "";
tabHtml += "";
tabHtml += "";
tabHtml += "";
tabHtml += "
";
tabHtml += "课程名称 | ";
tabHtml += "开课时间 | ";
tabHtml += "班号 | ";
tabHtml += "课时单价 | ";
tabHtml += "上课人数 | ";
tabHtml += "上课校区 | ";
tabHtml += "报名 | ";
tabHtml += "
";
for (var i = 0; i < rsDate.contentList.length; i++) {
var content = rsDate.contentList[i];
tabHtml += "
";
tabHtml += "" + content.name + " | ";
tabHtml += "" + content.startDate + " - " + content.endDate + " | ";
tabHtml += "" + content.title + " | ";
if (content.price == 0) {
tabHtml += " 请咨询课程顾问 | ";
} else {
tabHtml += "¥" + content.price + " | ";
}
tabHtml += "" + content.peopleNum + " | ";
tabHtml += "" + content.description + " | ";
tabHtml += "";
var leyu = "doyoo.util.openChat('g=10087431');return false;";
if (content.price == 0) {
if (leyu.indexOf("http") >= 0) {
tabHtml += "咨询";
} else {
tabHtml += "咨询";
}
}
else {
tabHtml += "报名";
}
tabHtml += " | ";
tabHtml += "
";
}
$("#rsDateTab").html(tabHtml);
var pageHtml = "";
if (rsDate.p.pageNo == 1) {
pageHtml += "
< 上一页";
} else {
pageHtml += "
< 上一页";
}
if (rsDate.p.totalPage <= 5) {
for (var i = 1; i < rsDate.p.totalPage; i++) {
if (rsDate.p.pageNo == i) {
pageHtml += "
" + i + "";
} else {
pageHtml += "
" + i + "";
}
}
} else if ((rsDate.p.totalPage - 3) < rsDate.p.pageNo) {
for (var i = (rsDate.p.totalPage - 4); i < (rsDate.p.totalPage + 1); i++) {
if (rsDate.p.pageNo == i) {
pageHtml += "
" + i + "";
} else {
pageHtml += "
" + i + "";
}
}
} else {
if (rsDate.p.pageNo <= 5) {
for (var i = 1; i < 6; i++) {
if (rsDate.p.pageNo == i) {
pageHtml += "
" + i + "";
} else {
pageHtml += "
" + i + "";
}
}
} else {
for (var i = (rsDate.p.pageNo - 2); i < (rsDate.p.pageNo); i++) {
pageHtml += "
" + i + "";
}
pageHtml += "
" + rsDate.p.pageNo + "";
for (var i = (rsDate.p.pageNo + 1); i < (rsDate.p.pageNo + 3); i++) {
pageHtml += "
" + i + "";
}
}
}
if (rsDate.p.pageNo == rsDate.p.totalPage) {
pageHtml += "
下一页 >";
} else {
pageHtml += "
下一页 >";
}
$("#pageInfo").html(pageHtml);
}
});
}
function channelOrderBy(type) {
var o = 22;
if (type == 1) {
if (zongHeOrderBy == 22) {
zongHeOrderBy = 23;
} else {
zongHeOrderBy = 22;
}
o = zongHeOrderBy;
} else if (type == 2) {
if (priceOrder == 24) {
priceOrder = 25;
} else {
priceOrder = 24;
}
o = priceOrder;
} else if (type == 3) {
if (renQiOrder == 27) {
renQiOrder = 26;
} else {
renQiOrder = 27;
}
o = renQiOrder;
}
if (orderBy != o) {
orderBy = o;
getPage();
}
}