Ajax imports products, javascript+ajax realizes product page loading information

js

//load page

//load product list

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 = "";

//exchange rate judgment

//

" + (result.SupplierProductList[i].ProductList[j].PriceUSD.toString() == '0' ? 1 : result.SupplierProductList[i].ProductList[j].USDPriceList[0].MinQuantity) + ":" + result.SupplierProductList[i].ProductList[j].PriceUSD + "

//display search - product information list

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 += "

" + result.SupplierProductList[i].ProductList[j].Model + "" + result.SupplierProductList[i].ProductList[j].Manufacturer + "" + (result.SupplierProductList[i].ProductList[j].Quantity) + "" + result.SupplierProductList[i].ProductList[j].ShipDays + "" + result.SupplierProductList[i].ProductList[j].MinOrderQuantity + "+" + result.SupplierProductList[i].ProductList[i].DeliveryPoint + "" + result.SupplierProductList[i].ProductList[j].PriceUSD + "" + result.SupplierProductList[i].ProductList[j].PriceCNY + " 加入购物车
";

}

}

//display search -- brand list

var html2 = "

all

";

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 + "

";

}

}

}

// retract

html2 += " more+ ";

}

//Do not delete the first content, append the product information table

$("#r2_text2").not($(".cur1")).empty();

$("#r2_text2").append(html2);

// rewrite the brand row

$(".tr3").empty();

$(".tr3").append(html);

}

}

};

$ .ajaxRequest (PostExecParam);

};

.cshtml

  • sx_03.gif

    filter

  • IC >>

@*

INFINEON × 100-1000 pieces × domestic ×*@

model:

brand:

all

FTDI

WIINET

3M-STATIC CONTROL SOLUTIONS

AAVID THERMALLOY

ALLIANCE

more+

Inventory Quantity:

- subject

place of delivery:

all

domestic

Hongkong

model

brand

Inventory quantity

Delivery time

MOQ

place of delivery

Delivery in Hong Kong

Domestic delivery

operate

(working days)

(including 17% tax)

The above is the whole content of this article, I hope you like it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325673848&siteId=291194637