js
//加载产品列表
function GetProductList() {
function PostParam(param) {
param.key = "lm324";
return param;
}
var PostExecParam = {
ClassName: "AnxinE.BLL.Product.ProductInfoBLL",MethodName: "Search",ParamModelName: "AnxinE.Model.Product.ProductInfoParam",onRequest: PostParam,onResponse: function (result) {
if (result != null) {
var html = "";
//汇率判断
//<td>" + (result.SupplierProductList[i].ProductList[j].PriceUSD.toString() == '0' ? 1 : result.SupplierProductList[i].ProductList[j].USDPriceList[0].MinQuantity) + ":" + result.SupplierProductList[i].ProductList[j].PriceUSD + "</td>
//展示搜索-产品信息列表
for (var i = 0; i < result.SupplierProductList.length; i++) {
for (var j = 0; j < result.SupplierProductList[i].ProductList.length; j++) {
//if (result.SupplierProductList[i].ProductList[j].PriceUSD!=null) {
//}
html += "<tr><td>" + result.SupplierProductList[i].ProductList[j].Model + "</td><td>" + result.SupplierProductList[i].ProductList[j].Manufacturer + "</td><td>" + (result.SupplierProductList[i].ProductList[j].Quantity) + "</td><td>" + result.SupplierProductList[i].ProductList[j].ShipDays + "</td><td>" + result.SupplierProductList[i].ProductList[j].MinOrderQuantity + "+</td><td>" + result.SupplierProductList[i].ProductList[i].DeliveryPoint + "</td><td>" + result.SupplierProductList[i].ProductList[j].PriceUSD + "</td><td>" + result.SupplierProductList[i].ProductList[j].PriceCNY + "</td><td>加入购物车</td></tr>
";
}
}
//展示搜索--品牌列表
var html2 = "全部
";
if (result.ManufacturerList.length > 0) {
for (var i = 0; i < result.ManufacturerList.length ; i++) {
if (result.ManufacturerList[i].KeyName != null) {
if (i < 5) {
html2 += "" + result.ManufacturerList[i].KeyName + "
";
}
}
}
//<a href="javascript:void(0);" id="regain_r2">收回
html2 += "更多+";
}
//不删除第一个内容,将产品信息表追加
$("#r2_text2").not($(".cur1")).empty();
$("#r2_text2").append(html2);
//改写品牌行
$(".tr3").empty();
$(".tr3").append(html);
}
}
};
$.ajaxRequest(PostExecParam);
};
.cshtml
筛选