include './../../include/admincommon.inc.php'; $currentPage = 'duihuan_create'; $manageGroup = 'Choujiang'; $promotePositionArr = rGetPromotePositionArr('goods'); $categoryArr = rGetCategoryArr(); $pindaoArr = rGetPindaoArr(); $dopost = isset($_POST['dopost']) ? $_POST['dopost'] : ''; $numIid = isset($_POST['numIid']) ? trim($_POST['numIid']) : ''; //提交过来的num_iid $createMessage = ''; if ($dopost == 'caiji') { if ($numIid != "" && rRuleNum($numIid)) { include dirname(__FILE__) . '/../../uaj_taobao_json.php'; $createMessage = '采集进行中,请稍等........'; if (CAIJITYPE == 'KEY') { $getcon = keycaiji($numIid); } else { $getcon = GetPtaobao(array('uid' => $numIid, 'cj' => 1, 'hos' => $Zbk_user_host), 'pitem'); } $getcon = json_decode($getcon, TRUE); if (empty($getcon['item']['nick'][0])) { $createMessage = '不存在这个商品'; } else { $detail_url = $getcon['item']['detail_url'][0]; $num_iid = $getcon['item']['num_iid'][0]; $title = $getcon['item']['title'][0]; $nick = $getcon['item']['nick'][0]; $pic_url = $getcon['item']['pic_url'][0]; $num = $getcon['item']['num'][0]; $price = $getcon['item']['oldprice'][0]; $freight_payer = $getcon['item']['auction_point'][0];
$arry["item"]["nick"] = $resp->item->nick; $arry["item"]["pic_url"] = $resp->item->pic_url; $arry["item"]["oldprice"] = $resp->item->price; $arry["item"]["price"] = $resp->item->price; $arry["item"]["auction_point"] = 0; } if (is_array($arry)) { $arry["id"] = 221; $arry["msg"] = "获取成功"; return json_encode($arry); } else { $arry["id"] = 0; $arry["msg"] = "不存在这个商品"; return json_encode($arry); } } if (isset($_POST['u'])) { $u = trim($_POST['u']); if ($u != "" && CAIJITYPE == 'CJ') { $getcon = GetPtaobao(array('uid' => $u, 'cj' => 1, 'hos' => $Zbk_user_host), 'pitem'); echo $getcon; exit; } elseif ($u != "" && CAIJITYPE == 'KEY') { echo keycaiji($u); } else { $arry["id"] = 0; $arry["msg"] = "采集超时或者不存在这个商品"; echo json_encode($arry); exit; } }