var test = true;
window.onload = function (ev) {
init();
}
init = function () {
getProductInfo("", 1, 10);
}
getProductInfo = function (judge, pageindex, pagesize) {
var parameter = urlEncode(["SelectAllProduct", judge, pageindex, pagesize]);
$.ajax({
type: "post",
url: "/taiwan/php/index.php",
data: {mode: parameter},
dataType: "json",
success: function (data) {
if (data.length == 0 || data == -1) {
var th = '
' +
'' + data[i].ProductId + ' | ' +
'' + data[i].ProductRemarks + ' | ' +
'' + data[i].ProductName + ' | ' +
'' + data[i].ProductPrimeCost + ' | ' +
'' + data[i].ProductPrice + ' | ' +
// '' + data[i].ProductIntroduce + ' | ' +
'' + data[i].ProductIntroduce + ' | ' +
'' + data[i].ProductAddTime + ' | ' +
'' +
'查看H5页面>' +
'查看产品信息' +
' |
');
warp.append(tr);
}
$("#loading").css({"display": "none"});
$("#warp").css({"display": "table-row-group"});
}
keySearchProductInfo = function () {
if (event.keyCode == 13) {
searchProductInfo();
}
}
searchProductInfo = function () {
var _val = $("#SearchPlaceBtn").val().trim();
if (_val == "") {
layer.msg('请输入订单号、人名、地址、手机号其中一个', {icon: 1});
}
else {
getProductInfo(_val, 1, 10);
}
}
product_add = function (title, url) {
var index = layer.open({
type: 2,
title: title,
content: url
});
layer.full(index);
}
urlEncode = function (arr) {
var i; //循环初始化
for (i = 0; i < arr.length; i++) {
arr[i] = encodeURIComponent(encodeURIComponent(arr[i]));
}
return arr.join();
}
toogle = function (cs) {
var child = $(cs);
for (var i = 0; i < child.length; i++) {
if (child[i].style.display == "none") {
child[i].style.display = "block";
} else {
child[i].style.display = "none";
}
}
}