You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
4.2 KiB
JavaScript
100 lines
4.2 KiB
JavaScript
$(function () {
|
|
var text = "";
|
|
var keywords = "";
|
|
GetInsuranceProlist(keywords, text);
|
|
$("#InsuranceProBtn2").click(function () {
|
|
keywords = $.trim($("#InsuranceProInput2").val()).replace(/[<>&"]/g, function (c) { return { '<': '<', '>': '>', '&': '&', '"': '"', '"': '"', "'": '′', "'": '′' }[c]; });
|
|
if (keywords == "产品名称") { keywords = ""; }
|
|
GetInsuranceProlist(keywords, text);
|
|
|
|
});
|
|
|
|
$("#InsuranceProInput2").unbind("focus").focus(function () {
|
|
|
|
$("#InsuranceProInput2").val("").css("color", "black");
|
|
});
|
|
$('.condition:first li:not(first-child)').click(function () {
|
|
$(this).addClass('active');
|
|
$(this).siblings().removeClass('active')
|
|
var html = $(this).html();
|
|
if (html == "人寿险") {
|
|
$("#ul3").html("<li class='active'>不限</li><li>定期寿险</li ><li>两全保险</li><li>终身寿险</li>");
|
|
} else if (html == "健康险") {
|
|
$("#ul3").html("<li class='active'>不限</li><li>定期重疾险</li ><li>医疗费用补偿险</li><li>终身重疾险</li><li>住院费用补贴险</li>");
|
|
}
|
|
else if (html == "意外险") {
|
|
$("#ul3").html("<li class='active'>不限</li><li>交通意外险</li ><li>旅行意外险</li><li>人身意外伤害险</li>");
|
|
}
|
|
else if (html == "投资型保险") {
|
|
$("#ul3").html("<li class='active'>不限</li><li>分红保险</li ><li>投资连结险</li><li>万能保险</li>");
|
|
} else {
|
|
$("#ul3").html("<li class='active'>不限</li><li>定期寿险</li ><li>两全保险</li><li>终身寿险</li><li>定期重疾险</li ><li>医疗费用补偿险</li><li>终身重疾险</li><li>住院费用补贴险</li><li>交通意外险</li ><li>旅行意外险</li><li>人身意外伤害险</li><li>分红保险</li ><li>投资连结险</li><li>万能保险</li>");
|
|
}
|
|
$('.condition:last li:not(first-child)').on("click", function () {
|
|
$(this).addClass('active');
|
|
$(this).siblings().removeClass('active');
|
|
text = $(this).html();
|
|
if (text == "不限") {
|
|
text = "";
|
|
}
|
|
GetInsuranceProlist(keywords, text);
|
|
})
|
|
})
|
|
$('.condition:first li:first-child').click(function () {
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
GetInsuranceProlist(keywords, "");
|
|
})
|
|
$('.condition:last li:not(first-child)').click(function () {
|
|
$(this).addClass('active');
|
|
$(this).siblings().removeClass('active');
|
|
debugger;
|
|
text = $(this).html();
|
|
if (text == "不限") {
|
|
text = "";
|
|
}
|
|
GetInsuranceProlist(keywords,text);
|
|
|
|
})
|
|
$('.condition:last li:first-child').click(function () {
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
GetInsuranceProlist(keywords,"");
|
|
})
|
|
});
|
|
|
|
function GetInsuranceProlist(keywords, kind) {
|
|
pageHelper.Init({
|
|
url: "/Teacher/InsurancePro/GetInsuranceProlist",
|
|
type: "POST",
|
|
pageDiv: "#pages",
|
|
data:
|
|
{
|
|
keywords: keywords,
|
|
kind: kind
|
|
},
|
|
bind: function (data) {
|
|
var html = "";
|
|
if (data.Data.length > 0) {
|
|
$(data.Data).each(function (index, dom) {
|
|
//每行html
|
|
var trHtml = "";
|
|
trHtml += "<ul>";
|
|
trHtml += "<li><h6>{0}</h6 ><div class='introduction'><p>{1}</p><a href='javascript:InsuranceDetail({2})' class='detail'>产品详情</a></div></li >";
|
|
trHtml += "</ul>";
|
|
|
|
//拼接tbody
|
|
html += StringHelper.FormatStr(trHtml,
|
|
dom.Name,
|
|
dom.Features,
|
|
dom.Id
|
|
);
|
|
});
|
|
} else {
|
|
html = "<ul><li><center>未找到相关记录!</center></li >";
|
|
}
|
|
$("#product_list2").html(html);
|
|
}
|
|
});
|
|
}
|
|
function InsuranceDetail(id) {
|
|
location.href = "/Teacher/InsurancePro/Detail?Id=" + id;
|
|
} |