?// ');
flyer.fly({
start: {
left: btn.offset().left + 62,
top: btn.offset().top - $(window).scrollTop() - 36,
},
end: {
left: offset.left,
top: offset.top - $(window).scrollTop(),
width: 20,
height: 20
}
});
},
}
ec.productList = {
api: new ec.api("product"),
classId: "",
init: function () {
ke.ui.render();
ke.ui.findControls("filter", "input").forEach(function (con) {
con.change(function () {
ec.productList.filter.getData(1);
});
});
var type = ke.parm("filter");
ke.ui.findControls("product_tags", "input").forEach(function (con) {
if (con.skin.id == type) {
con.click();
ec.productList.filter.getData(1);
}
});
},
price: {
getData: function (el, productNum) {
var isShow = $(el).parents("tr").hasClass("active");
if (!isShow) {
ec.utilities.loading();
ec.productList.api.get("getPrice?productNum=" + productNum, function (r) {
ec.productList.price.render(el, r);
});
}
else {
ec.productList.price.render(el);
}
},
render: function (el, r) {
var item = $(el).parents("tr");
item.toggleClass("active");
var price = item.next();
price.toggleClass("active1").toggle();
item.prev().prev().toggleClass("active2");
$(el).find("span").html(item.hasClass("active") ? L.G("收回") : L.G("h库存"));
if (r) {
var html = ke.template.get("price_table").render(r);
item.next().find(".price").html(html);
ec.utilities.unLoading();
}
}
},
filter: {
pn: 1,
getData: function (pn, mode) {
if (pn)
this.pn = pn;
ec.utilities.loading();
var url = "/getListData";
if (ec.productList.classId)
url += "?classId=" + ec.productList.classId + "&pn=" + pn;
else
url += "?pn=" + this.pn;
if (mode >= 0)
url += "&mode=" + mode;
var info = ke.createObject("filter");
info.Tags = [];
$("#product_tags .input").each(function () {
var el = $(this);
if (el.hasClass("checkbox-selected"))
info.Tags.push(el.attr("id"));
})
ec.productList.api.post(url, info, function (r) {
ec.productList.filter.render(r);
});
},
render: function (r) {
ec.utilities.unLoading();
$(".product-data").html(r.dataHtml);
$(".ico-array1").toggleClass("ico-array1-hover", r.mode != 2);
$(".ico-array2").toggleClass("ico-array2-hover", r.mode == 2);
$("#search_total").html(r.Pager.Total);
$(".paging a").removeClass("active").eq(r.Pager.PageIndex).addClass("active");
$(".nodata").toggle(r.Pager.Total == 0);
$(".paging").toggle(r.Pager.Total > 0);
$(".product-data").toggle(r.Pager.Total > 0);
this.paging(r.Pager);
window.scrollTo(0, 0);
},
paging: function (data) {
var html = "";
html += "";
for (var i = data.Start; i <= data.End; i++) {
html += "" + i + "";
}
html += "";
$(".paging").html(html);
}
},
navToggle: function (el) {
$(el).find(".ico10").toggleClass("ico-up10");
$(el).parent().nextAll().slideToggle();
}
}
$(window.document).ready(function () {
_api_error = ec.api.error;
ec.api.error = function (req, textStatus) {
ec.enable("#btn_cart", L.G("加入购物?));
ec.enable(".action .btn1", L.G("加入购物?));
_api_error(req, textStatus);
}
}); 精品国产午夜理论片不卡_亚洲欧美人高清精品a∨_丰满人妻一区二区三区视频_奇米影视7777久久