?> </span></div> <a href="javascript:void(0)" id="hm_product_ti_more" infoID="<?php echo $item['ID']; ?> " class="shop_home_more"></a> <hr id="hm_product_ti_line" /> <div class="hm_products_infor"> <ul> <?php $num = 0; foreach ($childIdArray as $child) { //根据子类别ID($child['ID'])获取产品信息 $conditionArray = array("status" => "Y", "category" => $child['ID']); $targetArray = array("ID", "name", "realPrice", "label", "defaultImg"); $productArray = $vpm->query($conditionArray, $targetArray); if (count($productArray)) { foreach ($productArray as $item2) { if ($num >= 8) { break; } ?> <li><a href="shop-info.php?id=<?php echo $item2['ID']; ?> "><img style="width:180px;height:180px" src="<?php echo $virtualRootPath . $img->getPathByID($item2['defaultImg']); ?> " title="<?php echo $item2['name']; ?>
$option = $_POST['option']; switch ($option) { case 'search': //echo 'search'; $conditionArray = array('status' => 'Y', 'name' => $_POST['name']); $targetArray = array("ID", "name", "realPrice", "label", "defaultImg", "selledNum", 'createTime', 'isDiscount', 'isPromotion', 'isPost'); echo $vpd->muddyQueryJson($conditionArray, $targetArray); break; case 'parentCat': //echo 'parentCat'; $childIDArray = $vcp->getChildIDArray($_POST['catID']); $result = array(); foreach ($childIDArray as $item) { $conditionArray = array('status' => 'Y', 'category' => $item['ID']); $targetArray = array("ID", "name", "realPrice", "label", "defaultImg", "selledNum", 'createTime', 'isDiscount', 'isPromotion', 'isPost'); $result = array_merge($result, $vpd->query($conditionArray, $targetArray)); } echo json_encode($result); break; case 'childCat': //echo 'childCat'; $conditionArray = array('status' => 'Y', 'category' => $_POST['catID']); $targetArray = array("ID", "name", "realPrice", "label", "defaultImg", "selledNum", 'createTime', 'isDiscount', 'isPromotion', 'isPost'); echo $vpd->queryJson($conditionArray, $targetArray); break; case 'post': //echo 'post'; $conditionArray = array('status' => 'Y', 'isPost' => 'Y'); $targetArray = array("ID", "name", "realPrice", "label", "defaultImg", "selledNum", 'createTime', 'isDiscount', 'isPromotion', 'isPost'); echo $vpd->queryJson($conditionArray, $targetArray); break;