代码拉取完成,页面将自动刷新
同步操作将从 徐子玉/品贷网 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
include_once 'config.php';
include_once 'sign.php';
header("Content-Type: text/html; charset=UTF-8");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$act = isset($_GET["act"]) ? $_GET["act"] : "0";
$client = new SoapClient($GLOBAL_REMOTE_API);
function getIP(){
global $ip;
if (getenv("HTTP_CLIENT_IP"))
$ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR"))
$ip = getenv("REMOTE_ADDR");
else $ip = "Unknow";
return $ip;
}
if ($act == "login") {
$LoginName = $_POST["LoginName"];
$PassWord = $_POST["PassWord"];
$parms = array("LoginName" => $LoginName, "PassWord" => $PassWord);
$result = $client->userLogin($parms);
$jsons = $result->userLoginResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$data = $jsonArray[0]['data'];
$serachArr = array();
$resultArr = array();
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
$serachArr['AuthType'] = $data[0]['AuthType'];
$serachArr['AuthState'] = $data[0]['AuthState'];
$serachArr['success'] = $success;
$serachArr['error'] = $error;
$resultArr[] = $serachArr;
if ($success == true) {
session_start();
$_SESSION["userid"] = $data[0]['ProxyId'];
$_SESSION["userName"] = $data[0]['ProxyName'];
$_SESSION["authType"] = $data[0]['AuthType'];
echo json_encode($resultArr);
} else {
echo json_encode($resultArr);
}
}
if ($act == "register") {
$strJson = $_POST["strJson"];
$parms = array("strJson" => $strJson);
$result = $client->userRegist($parms);
$jsons = $result->userRegistResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo "_ok";
} else if ($totalCount > 0 && $success == false) {
if ($error == "该手机号已被注册") {
echo "_fa_1";
} else {
echo "_fa";
}
}
}
if ($act == "setCity") {
$city = isset($_POST["city"]) ? $_POST["city"] : "上海市";
session_start();
$_SESSION["city"] = $city;
}
//找回密码
if ($act == "resetPassword") {
$phoneNumber = $_POST["phoneNumber"];
$code = $_POST["code"];
$newPassword = $_POST["newPassword"];
$parms = array("phoneNumber" => $phoneNumber, "code" => $code, "newPassword" => $newPassword);
$result = $client->resetUserPassword($parms);
$jsons = $result->resetUserPasswordResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo "success";
} else {
echo $error;
}
}
if ($act == "province") {
$parms = array("rank" => "1", "upid" => "1");
$result = $client->getProvince($parms);
$jsons = $result->getProvinceResult;
$jsonArray = json_decode($jsons, TRUE);
$provArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$provArr['id'] = $json['id'];
$provArr['name'] = $json['name'];
$resultArr[] = $provArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
if ($act == "series") {
$ProductType_result = $client->PD_ProductType();
$PD_ProductTypeResult = $ProductType_result->PD_ProductTypeResult;
$PD_ProductTypeResultArray = json_decode($PD_ProductTypeResult, TRUE);
$seriesArr = array();
$resultArr = array();
//开始解析
$ProductType_totalCount = $PD_ProductTypeResultArray[0]['totalCount'];
$ProductType_success = $PD_ProductTypeResultArray[0]['success'];
$ProductType_data = $PD_ProductTypeResultArray[0]['data'];
if ($ProductType_totalCount > 0 && $ProductType_success == true) {
foreach ($ProductType_data as $key => $d) {
$seriesArr[SeriesId] = $ProductType_data[$key]['SeriesId'];
$seriesArr[SeriesName] = $ProductType_data[$key]['SeriesName'];
$resultArr[] = $seriesArr;
}
echo json_encode($resultArr);
}
}
if ($act == "city") {
$province = $_POST["pid"];
$parms = array("rank" => "2", "upid" => $province);
$result = $client->getProvince($parms);
$jsons = $result->getProvinceResult;
$jsonArray = json_decode($jsons, TRUE);
$cityArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$cityArr['id'] = $json['id'];
$cityArr['name'] = $json['name'];
$resultArr[] = $cityArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
if ($act == "district") {
$city = $_POST["cid"];
$parms = array("rank" => "3", "upid" => $city);
$result = $client->getProvince($parms);
$jsons = $result->getProvinceResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$districtArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$districtArr['id'] = $json['id'];
$districtArr['name'] = $json['name'];
$resultArr[] = $districtArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
if ($act == "town") {
$town = $_POST["did"];
$parms = array("rank" => "4", "upid" => $town);
$result = $client->getProvince($parms);
$jsons = $result->getProvinceResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$townArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$townArr['id'] = $json['id'];
$townArr['name'] = $json['name'];
$resultArr[] = $townArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
if ($act == "address") {
$address = $_POST["did"];
$parms = array("rank" => "4", "upid" => $town);
$result = $client->getProvince($parms);
$jsons = $result->getProvinceResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$townArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$townArr['id'] = $json['id'];
$townArr['name'] = $json['name'];
$resultArr[] = $provArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//获取热门产品
if ($act == "hotProduct") {
$xml = '';
$result = $client->PD_hotProduct($xml);
$jsons = $result->PD_hotProductResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo json_encode($data);
}
}
//获取热门厂家
if ($act == "hotFactory") {
$xml = '';
$result = $client->PD_hotFactory($xml);
$jsons = $result->PD_hotFactoryResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo json_encode($data);
}
}
//根据产品类型获取厂商列表
if ($act == "getFactory") {
$topTypeId = $_POST["topTypeId"];
$parms = array("topTypeId" => $topTypeId, "i" => '1');
$result = $client->PD_getFactoryByTopType($parms);
$jsons = $result->PD_getFactoryByTopTypeResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo json_encode($data);
}
}
if($act == "MsgCodeV2") {
session_start();
$phoneNumber = $_POST["phoneNumber"];
$inputCode = $_POST["inputCode"];
$vcode = $_SESSION['verify_py']['code'];
if($inputCode != ""){
if($inputCode == $vcode){
$times = isset($_POST["times"]) ? $_POST["times"] : 6;
$ip = getIP();
$para = array();
$para['strIpAddr'] = $ip;
$para['strPhoneNo'] = $phoneNumber;
$mySignWeb = createMySign($para,$msgKey);
$parms = array("phoneNumber" => $phoneNumber,"ip" => $ip,"times" => $times,"sign" => $mySignWeb);
$result = $client -> userMsgCodeProc_web($parms);
$jsons = $result -> userMsgCodeProc_webResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
}
else{
echo $jsonArray[0]['error'];
}
}
else{
echo "codeFailed";
}
}
else{
echo "codeFailed";
}
}
//验证验证码
if ($act == "userCheckCode") {
$phoneNumber = $_POST["phoneNumber"];
$code = $_POST["code"];
$parms = array("phoneNumber" => $phoneNumber, "code" => $code);
$result = $client->userCheckCode($parms);
$jsons = $result->userCheckCodeResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
}
}
//获取产品系列
if ($act == "Series") {
$xml = '';
$result = $client->PD_ProductType($xml);
$sid_select = $_POST["sid_select"];
$jsons = $result->PD_ProductTypeResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$SerieArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$SerieArr['SeriesId'] = $json['SeriesId'];
$SerieArr['SeriesName'] = $json['SeriesName'];
$SerieArr['Type'] = $json['Type'];
$resultArr[] = $SerieArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//获取首页导航信息
if ($act == "IndexNav") {
$xml = '';
$result = $client->getIndexNav($xml);
$jsons = $result->getIndexNavResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$SerieArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$SerieArr['SeriesId'] = $json['SeriesId'];
$SerieArr['SeriesName'] = $json['SeriesName'];
$SerieArr['Type'] = $json['Type'];
$SerieArr['Factorys'] = $json['Factorys'];
$resultArr[] = $SerieArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//获取产品类型
if ($act == "Type") {
$xml = '';
$result = $client->PD_ProductType($xml);
$sid_select = $_POST["sid_select"];
$jsons = $result->PD_ProductTypeResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$SerieArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$SerieArr['SeriesId'] = $json['SeriesId'];
$SerieArr['SeriesName'] = $json['SeriesName'];
$SerieArr['Type'] = $json['Type'];
$resultArr[] = $SerieArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//产品搜索
if ($act == "search") {
$keys = isset($_POST["keys"]) ? $_POST["keys"] : "";
$seriesId = isset($_POST["seriesId"]) ? $_POST["seriesId"] : 0;
$typeId = isset($_POST["typeId"]) ? $_POST["typeId"] : 0;
$subTypeId = isset($_POST["subTypeId"]) ? $_POST["typeId"] : 0;
$city = isset($_POST["city"]) ? $_POST["city"] : "";
$district = isset($_POST["district"]) ? $_POST["district"] : "";
$town = isset($_POST["town"]) ? $_POST["town"] : "";
$getAll = isset($_POST["getAll"]) ? $_POST["getAll"] : 1;
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 1;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 20;
$parms = array("search" => $keys, "seriesId" => $seriesId, "typeId" => $typeId, "subTypeId" => $subTypeId, "city" => $city, "district" => $district, "town" => $town, "getAll" => $getAll, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
$result = $client->PD_getFactroyListPage($parms);
$jsons = $result->PD_getFactroyListPageResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['BusinessScope'] = $json['BusinessScope'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//代理筛选
if ($act == "factoryProxy") {
$user_id = isset($_POST["user_id"]) ? $_POST["user_id"] : 0;
$Lv = isset($_POST["Lv"]) ? $_POST["Lv"] : 1;
$getAll = isset($_POST["getAll"]) ? $_POST["getAll"] : 1;
$strJson = isset($_POST["strJson"]) ? $_POST["strJson"] : "";
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 0;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 20;
$parms = array("proxyId" => $user_id, "Lv" => $Lv, "strJson" => $strJson, "pageIndex" => $pageIndex, "getAll" => $getAll, "pageSize" => $pageSize);
// var_dump($parms);
// die();
$result = $client->CRM_FactoryProxyV2($parms);
//获取产品信息
$agentResult = $result->CRM_FactoryProxyV2Result;
$agentResultArray = json_decode($agentResult, TRUE);
//开始解析
//获取产品信息
$agent_totalCount = $agentResultArray[0]['totalCount'];
$agent_success = $agentResultArray[0]['success'];
$agent_data = $agentResultArray[0]['data'];
if ($agent_totalCount > 0 && $agent_success == true) {
$serachArr = array();
$resultArr = array();
foreach ($agentResultArray[0]['data'] as $json) {
//var_dump($json['id']);
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['BusinessScope'] = $json['BusinessScope'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//产品搜索
if ($act == "custom") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 0;
$parms = array("search" => $search, "seriesId" => $seriesId, "typeId" => "0", "subTypeId" => "0", "city" => "", "district" => "", "town" => "", "pageIndex" => "1", "pageSize" => "9");
$result = $client->PD_getFactroyListPage($parms);
$jsons = $result->PD_getFactroyListPageResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['BusinessScope'] = $json['BusinessScope'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//根据系列 等级 随机获取 九宫格展示厂家 2015-11-1 19:45:16 缪杰修改
if ($act == "randomFactory") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 0;
$parms = array("SeriesId" => $seriesId);
$result = $client->getRandomFactoryNew($parms);
$jsons = $result->getRandomFactoryNewResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['FactoryId'] = $json['factoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['Lv'] = $json['lv'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//获取品牌信息
if ($act == "brand") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 0;
$typeId = isset($_GET["$typeId"]) ? $_GET["$typeId"] : 0;
$parms = array("SeriesId" => $seriesId);
$result = $client->getRandomFactoryNew($parms);
$jsons = $result->getRandomFactoryNewResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['FactoryId'] = $json['factoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['Lv'] = $json['lv'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//根据厂商id,获取厂商信息(店铺详情页)
if ($act == "getFactoryInfoById") {
$factoryId = $_POST["factoryId"];
$parms = array("factoryId" => $factoryId, "series" => $series);
// var_dump($parms);
$result = $client->PD_getFactoryInfoById($parms);
$jsons = $result->PD_getFactoryInfoByIdResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['Slogan'] = $json['Slogan'];
$serachArr['Address'] = $json['Address'];
$serachArr['Telphone'] = $json['Telphone'];
$serachArr['Logo'] = $json['Logo'];
$serachArr['Banner'] = $json['Banner'];
$serachArr['Email'] = $json['Email'];
$serachArr['Website'] = $json['Website'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//订单查询
if ($act == "order_Query") {
$userProxyId = $_POST["userProxyId"];
$state = $_POST["state"];
$pageIndex = $_POST["pageIndex"];
$pageSize = $_POST["pageSize"];
$type = $_POST["type"];
$parms = array("userProxyId" => $userProxyId, "state" => $state, "pageIndex" => $pageIndex, "pageSize" => $pageSize, "type" => $type);
$result = $client->order_Query($parms);
$jsons = $result->order_QueryResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['OrderId'] = $json['OrderId'];
$serachArr['OrderNo'] = $json['OrderNo'];
$serachArr['OrderDate'] = $json['OrderDate'];
$serachArr['ConsumerName'] = $json['ConsumerName'];
$serachArr['PhoneNumber'] = $json['PhoneNumber'];
$serachArr['ZipCode'] = $json['ZipCode'];
$serachArr['Remark'] = $json['Remark'];
$serachArr['Address'] = $json['Address'];
$serachArr['totalPrice'] = $json['totalPrice'];
$serachArr['OrderPrice'] = $json['OrderPrice'];
$serachArr['state'] = $json['state'];
$serachArr['products'] = $json['products'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//订单查询
if ($act == "order_QueryNew") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$searchText = $_POST["searchText"];
$dateStart = $_POST["dateStart"];
$dateEnd = $_POST["dateEnd"];
$state = $_POST["state"];
$pageIndex = $_POST["pageIndex"];
$pageSize = $_POST["pageSize"];
$type = $_POST["type"];
$parms = array("userProxyId" => $userProxyId, "searchText" => $searchText, "dateStart" => $dateStart, "dateEnd" => $dateEnd, "state" => $state, "pageIndex" => $pageIndex, "pageSize" => $pageSize, "type" => $type);
$result = $client->order_QueryNew($parms);
$jsons = $result->order_QueryNewResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['OrderId'] = $json['OrderId'];
$serachArr['OrderNo'] = $json['OrderNo'];
$serachArr['OrderDate'] = $json['OrderDate'];
$serachArr['ConsumerName'] = $json['ConsumerName'];
$serachArr['PostName'] = $json['PostName'];
$serachArr['PhoneNumber'] = $json['PhoneNumber'];
$serachArr['PostPhone'] = $json['PostPhone'];
$serachArr['ZipCode'] = $json['ZipCode'];
$serachArr['Remark'] = $json['Remark'];
$serachArr['PicUrl'] = $json['PicUrl'];
$serachArr['PostAddress'] = $json['PostAddress'];
$serachArr['totalPrice'] = $json['totalPrice'];
$serachArr['OrderPrice'] = $json['OrderPrice'];
$serachArr['state'] = $json['state'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['products'] = $json['products'];
$serachArr['totalCount'] = $totalCount;
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//订单审核
if ($act == "order_Check") {
session_start();
$userId = $_SESSION["userid"];
$userName = $_SESSION["userName"];
$state = $_POST["state"];
$orderId = $_POST["orderId"];
$orderPrice = $_POST["orderPrice"];
$ownerRemark = $_POST["ownerRemark"];
$parms = array("userId" => $userId, "userName" => $userName, "state" => $state, "orderPrice" => $orderPrice, "orderId" => $orderId, "ownerRemark" => $ownerRemark);
$result = $client->order_Check($parms);
$jsons = $result->order_CheckResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo "_ok";
} else {
echo "_fa";
}
}
//获取我的代理信息
if ($act == "getMyProxy") {
$proxyId = $_POST["proxyId"];
$parms = array("proxyId" => $proxyId, "series" => $series);
$result = $client->CRM_getMyProxy($parms);
$jsons = $result->CRM_getMyProxyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['Address'] = $json['Address'];
$serachArr['Telphone'] = $json['Telphone'];
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['ProxyInfo'] = $json['ProxyInfo'];
$serachArr['ProxyLv'] = $json['ProxyLv'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//根据厂商id获取厂商产品类型
if ($act == "getProductTypeByfid") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : 0;
$parms = array("factoryId" => $factoryId);
$result = $client->PD_getProductTypeByfid($parms);
$jsons = $result->PD_getProductTypeByfidResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr = array();
$serachArr['seriesId'] = $json['seriesId'];
$serachArr['typeId'] = $json['typeId'];
$serachArr['typeName'] = $json['typeName'];
$serachArr['subType'] = $json['subType'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//获取用户信息
if ($act == "userGetInfo") {
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : 0;
if ($userProxyId == 0) {
session_start();
$userProxyId = $_SESSION["userid"];
}
$parms = array("userProxyId" => $userProxyId);
$result = $client->userGetInfo($parms);
$jsons = $result->userGetInfoResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['UserFace'] = $json['UserFace'];
$serachArr['phoneNumber'] = $json['phoneNumber'];
$serachArr['ProxyName'] = $json['ProxyName'];
$serachArr['ProvinceName'] = $json['ProvinceName'];
$serachArr['CityName'] = $json['CityName'];
$serachArr['DistrictName'] = $json['DistrictName'];
$serachArr['TownName'] = $json['TownName'];
$serachArr['Address'] = $json['Address'];
$serachArr['PostAddress'] = $json['PostAddress'];
$serachArr['PostName'] = $json['PostName'];
$serachArr['PostPhone'] = $json['PostPhone'];
$serachArr['AuthType'] = $json['AuthType'];
$serachArr['ZipCode'] = $json['ZipCode'];
$serachArr['RegDate'] = $json['RegDate'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//下订单
if ($act == "pushTrade") {
$userProxyId = $_POST["userProxyId"];
$strJson = $_POST["strJson"];
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client->order_Place($parms);
$jsons = $result->order_PlaceResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo "_ok";
} else {
echo $error;
}
}
//根据产品id,用户级别获取产品信息
if ($act == "getProductInfo") {
$productId = $_POST["productId"];
$factoryId = $_POST["factoryId"];
$userProxyId = $_POST["userProxyId"];
$parms = array("productId" => $productId, "factoryId" => $factoryId, "userProxyId" => $userProxyId);
$result = $client->PD_getProductInfo($parms);
$jsons = $result->PD_getProductInfoResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$serachArr['productName'] = $json['productName'];
$serachArr['memo'] = $json['memo'];
$serachArr['productStandard'] = $json['productStandard'];
$serachArr['productPic'] = $json['productPic'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//根据厂商id,产品类型获取产品列表
if ($act == "getProductByFid") {
$factoryId = $_POST["factoryId"];
$subType = $_POST["subType"];
$userProxyId = $_POST["userProxyId"];
$parms = array("factoryId" => $factoryId, "userProxyId" => $userProxyId, "subType" => $subType);
$result = $client->PD_getProductByFid($parms);
$jsons = $result->PD_getProductByFidResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$serachArr['productId'] = $json['productId'];
$serachArr['productName'] = $json['productName'];
$serachArr['picUrl'] = $json['picUrl'];
$serachArr['productStandard'] = $json['productStandard'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//根据厂家id 分页获取产品列表 2015年9月24日 缪杰 添加
if ($act == "ProductList") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : "0";
$typeId = isset($_POST["typeId"]) ? $_POST["typeId"] : "0";
$subTypeId = isset($_POST["subTypeId"]) ? $_POST["subTypeId"] : "0";
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : "1";
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : "12";
$parms = array("factoryId" => $factoryId, "typeId" => $typeId, "subTypeId" => $subTypeId, "userProxyId" => $userProxyId, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
$result = $client->PD_getProductByFid($parms);
$jsons = $result->PD_getProductByFidResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['totalCount'] = $totalCount;
$serachArr['productId'] = $json['productId'];
$serachArr['productName'] = $json['productName'];
$serachArr['picUrl'] = $json['picUrl'];
$serachArr['color'] = $json['color'];
$serachArr['productStandard'] = $json['productStandard'];
$resultArr[] = $serachArr;
}
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
if ($act == "ProductList1") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$factoryIds = isset($_POST["factoryIds"]) ? $_POST["factoryIds"] : "";
$searchText = isset($_POST["searchText"]) ? $_POST["searchText"] : "";
$seriesId = isset($_POST["seriesId"]) ? $_POST["seriesId"] : "0";
$typeId = isset($_POST["typeId"]) ? $_POST["typeId"] : "0";
$subTypeId = isset($_POST["subTypeId"]) ? $_POST["subTypeId"] : "0";
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : "1";
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : "12";
$parms = array("searchText" => $searchText, "factoryIds" => $factoryIds, "seriesId" => $seriesId, "userProxyId" => $userProxyId, "typeId" => $typeId, "subTypeId" => $subTypeId, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
// var_dump($parms);
$result = $client->PD_getProductByFids($parms);
// var_dump($result);
$jsons = $result->PD_getProductByFidsResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['totalCount'] = $totalCount;
$serachArr['productId'] = $json['productId'];
$serachArr['productName'] = $json['productName'];
$serachArr['picUrl'] = $json['picUrl'];
$serachArr['color'] = $json['color'];
$serachArr['productStandard'] = $json['productStandard'];
$resultArr[] = $serachArr;
}
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//批量申请代理
if ($act == "proxyBatch") {
session_start();
$userProxyId = $_SESSION["userid"];
$factoryIds = $_POST["factoryIds"];
$proxyLv = $_POST["proxyLv"];
$parms = array("factoryIds" => $factoryIds, "userProxyId" => $userProxyId, "proxyLv" => $proxyLv);
// var_dump($parms);
$result = $client->CRM_proxyBatch($parms);
$jsons = $result->CRM_proxyBatchResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else if ($totalCount > 0 && $success == false) {
$error = $jsonArray[0]['error'];
echo json_encode($error);
}
}
//申请总代
if ($act == "proxyApply") {
session_start();
$userProxyId = $_SESSION["userid"];
$factoryId = $_POST["factoryId"];
$lv = $_POST["lv"];
$parms = array("factoryId" => $factoryId, "userProxyId" => $userProxyId, "lv" => $lv);
$result = $client->CRM_ProxyApplyLv($parms);
$jsons = $result->CRM_ProxyApplyLvResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else if ($totalCount > 0 && $success == false) {
$error = $jsonArray[0]['error'];
echo json_encode($error);
}
}
//代理申请
if ($act == "subProxyApply") {
session_start();
$userProxyId = $_SESSION["userid"];
$factoryId = $_POST["factoryId"];
$parms = array("factoryId" => $factoryId, "userProxyId" => $userProxyId);
$result = $client->CRM_subProxyApply($parms);
$jsons = $result->CRM_subProxyApplyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else if ($totalCount > 0 && $success == false) {
$error = $jsonArray[0]['error'];
echo json_encode($error);
}
}
//修改用户密码
if ($act == "userPassModify") {
session_start();
$userProxyId = $_SESSION["userid"];
$password = $_POST["password"];
$passwordNew = $_POST["passwordNew"];
$parms = array("password" => $password, "userProxyId" => $userProxyId, "passwordNew" => $passwordNew);
$result = $client->userPassModify($parms);
$jsons = $result->userPassModifyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $error;
}
}
//修改代理名称
if ($act == "userProxyNameModify") {
session_start();
$userProxyId = $_SESSION["userid"];
$userProxyName = $_POST["userProxyName"];
$parms = array("userProxyName" => $userProxyName, "userProxyId" => $userProxyId);
$result = $client->userProxyNameModify($parms);
$jsons = $result->userProxyNameModifyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
}
}
//收货地址修改
if ($act == "userPostInfoModify") {
session_start();
$userProxyId = $_SESSION["userid"];
$PostAddress = $_POST["PostAddress"];
$PostName = $_POST["PostName"];
$PostPhone = $_POST["PostPhone"];
$ZipCode = $_POST["ZipCode"];
$strJson = array("PostAddress" => $PostAddress, "PostName" => $PostName, "PostPhone" => $PostPhone, "ZipCode" => $ZipCode);
$strJson = json_encode($strJson);
$parms = array("strJson" => $strJson, "userProxyId" => $userProxyId);
$result = $client->userPostInfoModify($parms);
$jsons = $result->userPostInfoModifyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
}
}
//用户地址修改
if ($act == "userAddressModify") {
session_start();
$userProxyId = $_SESSION["userid"];
$province = $_POST["province"];
$city = $_POST["city"];
$district = $_POST["district"];
$town = $_POST["town"];
$address = $_POST["address"];
$strJson = array("city" => $city, "district" => $district, "town" => $town, "address" => $address, "province" => $province);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client->userAddressModify($parms);
$jsons = $result->userAddressModifyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
}
}
//发送验证码---修改
//if ($act == "userMsgCode") {
// $phoneNumber = $_POST["phoneNumber"];
// $parms = array("phoneNumber" => $phoneNumber, "i" => '1');
// $result = $client->userMsgCode($parms);
// $jsons = $result->userMsgCodeResult;
// $jsonArray = json_decode($jsons, TRUE);
////var_dump($phoneNumber);
////var_dump($jsonArray[0]['data']);
// $totalCount = $jsonArray[0]['totalCount'];
// $success = $jsonArray[0]['success'];
// $data = $jsonArray[0]['data'];
// if ($totalCount > 0 && $success == true) {
////echo success;
// echo($data[0]['code']);
// }
//}
//重新绑定手机号
if ($act == "userPhoneNumberModify") {
session_start();
$userProxyId = $_SESSION["userid"];
$phoneNumber = $_POST["phoneNumber"];
$parms = array("phoneNumber" => $phoneNumber, "userProxyId" => $userProxyId);
$result = $client->userPhoneNumberModify($parms);
$jsons = $result->userPhoneNumberModifyResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $error;
}
}
//个人实名认证审核
if ($act == "userAuthcert") {
session_start();
$userId = $_SESSION["userid"];
$realName = $_POST["realName"];
$IDNumber = $_POST["IDNumber"];
$IDPic = $_POST["IDPic"];
$strJson = array("realName" => $realName, "IDNumber" => $IDNumber, "IDPic" => $IDPic);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userId, "strJson" => $strJson);
$result = $client->userIdentityAuthenticate($parms);
$jsons = $result->userIdentityAuthenticateResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo "_ok";
} else {
echo $jsonArray[0]['error'];
}
}
//企业实名认证审核
if ($act == "companyAuthcert") {
session_start();
$userId = $_SESSION["userid"];
$realName = $_POST["realName"];
$IDNumber = $_POST["IDNumber"];
$IDPic = $_POST["IDPic"];
$strJson = array("realName" => $realName, "IDNumber" => $IDNumber, "IDPic" => $IDPic);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userId, "strJson" => $strJson);
$result = $client->companyAuthcert($parms);
$jsons = $result->companyAuthcertResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo "_ok";
} else {
echo $jsonArray[0]['error'];
}
}
//购物车产品数量存储
if ($act == "goodNumSave") {
$goodNum = $_POST["goodNum"];
session_start();
$_SESSION["goodNum"] = $goodNum;
echo $_SESSION["goodNum"];
}
//获取首页视频地址
if ($act == "getVideo") {
$type = 10;
$parms = array("type" => $type);
$result = $client->getADList($parms);
$jsons = $result->getADListResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo($data[0]['linkUrl']);
} else {
echo $jsonArray[0]['error'];
}
}
//获取广告列表
if ($act == "getADList") {
$adtype = isset($_POST['typeId']) ? $_POST['typeId'] : 0;
$ADTypes = array("type" => $adtype);
$ADList_result = $client->getADList($ADTypes);
$getADListResult = $ADList_result->getADListResult;
$getADListResultArray = json_decode($getADListResult, TRUE);
//开始解析
$ADList_totalCount = $getADListResultArray[0]['totalCount'];
$ADList_success = $getADListResultArray[0]['success'];
$ADList_data = $getADListResultArray[0]['data'];
if ($ADList_totalCount > 0 && $ADList_success == 'true') {
$ADArr = array();
$resultArr = array();
foreach ($ADList_data as $key => $d) {
$ADArr['factoryId'] = $ADList_data[$key]['factoryId'];
$ADArr['picUrl'] = $ADList_data[$key]['picUrl'];
$ADArr['linkUrl'] = $ADList_data[$key]['linkUrl'];
$ADArr['BusinessScope'] = $ADList_data[$key]['BusinessScope'];
$ADArr['Abbreviation'] = $ADList_data[$key]['Abbreviation'];
$resultArr[] = $ADArr;
}
echo json_encode($resultArr);
}
}
//首页轮播图
if ($act == "FactoryShow") {
$xml = '';
//首页轮播
$Show_result = $client->PD_getFactoryShow($xml);
$PD_getFactoryShowResult = $Show_result->PD_getFactoryShowResult;
$PD_getFactoryShowResultArray = json_decode($PD_getFactoryShowResult, TRUE);
//开始解析
$Show_totalCount = $PD_getFactoryShowResultArray[0]['totalCount'];
$Show_success = $PD_getFactoryShowResultArray[0]['success'];
$Show_data = $PD_getFactoryShowResultArray[0]['data'];
if ($Show_totalCount > 0 && $Show_success == "true") {
$factoryShowArr = array();
$resultArr = array();
foreach ($Show_data as $key => $d) {
$factoryShowArr["factoryId"] = $Show_data[$key]['factoryId'];
$factoryShowArr["picUrl"] = $Show_data[$key]['picUrl'];
$factoryShowArr["linkUrl"] = $Show_data[$key]['linkUrl'];
$factoryShowArr["slogan"] = $Show_data[$key]['slogan'];
$resultArr[] = $factoryShowArr;
}
echo json_encode($resultArr);
}
}
//用户意向
if($act == "userIntentImprove"){
$intentId = isset($_POST["intentId"]) ? $_POST["intentId"] : "0";
$intent = isset($_POST["intent"]) ? $_POST["intent"] : "";
$parms = array("intentId" => $intentId,"intent" => $intent);
$result = $client ->userIntentImprove($parms);
$jsons = $result ->userIntentImproveResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
echo "success";
} else {
echo $jsonArray[0]['error'];
}
}
if ($act == "intent") {
session_start();
$userId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$intent = $_POST["intent"];
$parms = array("userProxyId" => $userId, "intent" => $intent);
// var_dump($parms);
$result = $client->userIntent($parms);
// var_dump($result);
$jsons = $result->userIntentResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
// var_dump($totalCount);
$success = $jsonArray[0]['success'];
// var_dump($success);
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]['error'];
}
}
if($act == "userIntentV2"){
$name = isset($_POST["name"]) ? $_POST["name"] : "";
$tel = isset($_POST["tel"]) ? $_POST["tel"] : "";
$province = isset($_POST["province"]) ? $_POST["province"] : "";
$city = isset($_POST["city"]) ? $_POST["city"] : "";
$district = isset($_POST["district"]) ? $_POST["district"] : "";
$street = isset($_POST["street"]) ? $_POST["street"] : "";
$remark = isset($_POST["remark"]) ? $_POST["remark"] : "";
$parms = array("name" => $name, "phone" => $tel, "province" => $province, "city" => $city, "district" => $district, "street" => $street, "remark" => $remark);
$result = $client -> userIntentV2($parms);
$jsons = $result -> userIntentV2Result;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
$id = 0;
foreach ($jsonArray[0]['data'] as $json) {
$id = $json['id'];
}
echo $id;
} else {
echo "Failure";
}
}
if($act == "getIntentInfo"){
$id = isset($_POST["id"]) ? $_POST["id"] : 0;
$parms = array("intentId" => $id);
$result = $client -> getIntent ($parms);
$jsons = $result -> getIntentResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
$intentArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$intentArr['name'] = $json['name'];
$intentArr['tel'] = $json['tel'];
$intentArr['province'] = $json['province'];
$intentArr['city'] = $json['city'];
$intentArr['district'] = $json['district'];
$intentArr['street'] = $json['street'];
$intentArr['remark'] = $json['remark'];
$resultArr[] = $intentArr;
}
echo json_encode($resultArr);
} else {
echo "Failure";
}
}
//我的代理
if ($act == "getProxys") {
session_start();
$userId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("proxyId" => $userId);
$result = $client->CRM_getMyProxy($parms);
$jsons = $result->CRM_getMyProxyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
$proxyArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$proxyArr['Abbreviation'] = $json['Abbreviation'];
$proxyArr['FactoryId'] = $json['FactoryId'];
$proxyArr['ProxyLv'] = $json['ProxyLv'];
$resultArr[] = $proxyArr;
}
echo json_encode($resultArr);
} else {
echo $jsonArray[0]['error'];
}
}
//根据厂商id获取系列
if ($act == "getSeriesByFid") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : "0";
$parms = array("factoryId" => $factoryId);
$result = $client->getSeriesByFid($parms);
$jsons = $result->getSeriesByFidResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
$SeriesArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$SeriesArr['SeriesId'] = $json['SeriesId'];
$SeriesArr['SeriesName'] = $json['SeriesName'];
$resultArr[] = $SeriesArr;
}
echo json_encode($resultArr);
} else {
echo $jsonArray[0]['error'];
}
}
//代理审核 2015年10月15日 缪杰添加
if ($act == "proxyPass") {
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : "0";
$isPass = isset($_POST["isPass"]) ? $_POST["isPass"] : "0";
$parms = array("userProxyId" => $userProxyId, "isPass" => $isPass);
$result = $client->CRM_ProxyPass($parms);
$jsons = $result->CRM_ProxyPassResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo $isPass;
} else {
echo $jsonArray[0]['error'];
}
}
//获取广告 2015年10月20日 缪杰添加
if ($act == "getAd") {
$type = isset($_POST["type"]) ? $_POST["type"] : "100";
$parms = array("type" => $type);
$result = $client->PD_getAd($parms);
$jsons = $result->PD_getAdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
$AdArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$AdArr['factoryId'] = $json['factoryId'];
$AdArr['factoryName'] = $json['factoryName'];
$AdArr['picUrl'] = $json['picUrl'];
$AdArr['slogan'] = $json['slogan'];
$AdArr['linkUrl'] = $json['linkUrl'];
$resultArr[] = $AdArr;
}
echo json_encode($resultArr);
} else {
echo $jsonArray[0]['error'];
}
}
//保存收货地址
if ($act == "postAddressSave") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$postAddressId = isset($_POST["postAddressId"]) ? $_POST["postAddressId"] : "0";
$province = $_POST["province"];
$city = $_POST["city"];
$district = $_POST["district"];
$town = $_POST["town"];
$address = $_POST["address"];
$postCode = $_POST["postCode"];
$postName = $_POST["postName"];
$postTel = $_POST["postTel"];
$isDefault = $_POST["isDefault"];
$strJson = array("postName" => $postName, "postTel" => $postTel, "postCode" => $postCode, "provinceName" => $province, "cityName" => $city, "districtName" => $district, "townName" => $town, "postAddress" => $address, "isDefault" => $isDefault);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userProxyId, "postAddressId" => $postAddressId, "strJson" => $strJson);
$result = $client->PD_userPostAddressSave($parms);
$jsons = $result->PD_userPostAddressSaveResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo $data[0]['newPostId'];
}
else {
echo $jsonArray[0]["error"];
}
}
if ($act == "getPostAddress") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("userProxyId" => $userProxyId);
$result = $client->PD_getPostAddress($parms);
$jsons = $result->PD_getPostAddressResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
$postArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$postArr['postAddressId'] = $json['postAddressId'];
$postArr['postName'] = $json['postName'];
$postArr['postTel'] = $json['postTel'];
$postArr['postCode'] = $json['postCode'];
$postArr['provinceName'] = $json['provinceName'];
$postArr['cityName'] = $json['cityName'];
$postArr['districtName'] = $json['districtName'];
$postArr['townName'] = $json['townName'];
$postArr['postAddress'] = $json['postAddress'];
$postArr['isDefault'] = $json['isDefault'];
$resultArr[] = $postArr;
}
echo json_encode($resultArr);
} else {
echo "Failure";
}
}
//删除收货地址
if ($act == "postAddressDelete") {
$postAddressId = $_POST["postAddressId"];
$parms = array("postAddressId" => $postAddressId);
$result = $client->postAddressDelete($parms);
$jsons = $result->postAddressDeleteResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]['error'];
}
}
//设为默认地址
if ($act == "defaultPostAddr") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$postAddressId = $_POST["postAddressId"];
$parms = array("userProxyId" => $userProxyId, "postAddressId" => $postAddressId);
$result = $client->defaultPostAddr($parms);
$jsons = $result->defaultPostAddrResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]['error'];
}
}
//提交个人实名认证
if ($act == "PAUpLoad") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$authId = $_POST["authId"];
$Authname = $_POST["Authname"];
$IDNumber = $_POST["IDNumber"];
$IDPic = $_POST["IDPic"];
$Age = $_POST["Age"];
$Address = $_POST["Address"];
$Tel = $_POST["Tel"];
$Occupation = $_POST["Occupation"];
$Seniority = $_POST["Seniority"];
$Company = isset($_POST["Company"]) ? $_POST["Company"] : "";
$Memo = $_POST["Memo"];
$Certificate1 = $_POST["Certificate1"];
$Certificate2 = $_POST["Certificate2"];
$strJson = array("authId" => $authId, "Authname" => $Authname, "IDNumber" => $IDNumber, "IDPic" => $IDPic, "Age" => $Age, "Address" => $Address, "Tel" => $Tel, "Occupation" => $Occupation, "Seniority" => $Seniority,"Company" => $Company, "Memo" => $Memo,"Certificate1" => $Certificate1, "Certificate2" => $Certificate2);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client->CRM_personalAuthUpLoad($parms);
$jsons = $result->CRM_personalAuthUpLoadResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]["error"];
}
}
//提交企业实名认证
if ($act == "CPAUpLoad") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$authId = $_POST["authId"];
$CompanyName = $_POST["CompanyName"];
$LicenseType = $_POST["LicenseType"];
$BusinessLicense = $_POST["BusinessLicense"];
$TaxCode = $_POST["TaxCode"];
$SocialCode = $_POST["SocialCode"];
$Bank = $_POST["Bank"];
$BankAccount = $_POST["BankAccount"];
$ContactName = $_POST["ContactName"];
$ContactPhone = $_POST["ContactPhone"];
$BusinessLicensePic = $_POST["BusinessLicensePic"];
$OrganizationCodePic = $_POST["OrganizationCodePic"];
$TaxRegistrationCertificatePic = $_POST["TaxRegistrationCertificatePic"];
$CorporationIDCardPic = $_POST["CorporationIDCardPic"];
$CorporationIDCardPic1 = $_POST["CorporationIDCardPic1"];
$strJson = array("CAId" => $authId, "CompanyName" => $CompanyName,"LicenseType" => $LicenseType, "BusinessLicense" => $BusinessLicense, "TaxCode" => $TaxCode,"SocialCode" => $SocialCode, "Bank" => $Bank, "BankAccount" => $BankAccount, "ContactName" => $ContactName, "ContactPhone" => $ContactPhone, "BusinessLicensePic" => $BusinessLicensePic, "OrganizationCodePic" => $OrganizationCodePic, "TaxRegistrationCertificatePic" => $TaxRegistrationCertificatePic, "CorporationIDCardPic" => $CorporationIDCardPic ,"CorporationIDCardPic1" => $CorporationIDCardPic1);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client->CRM_companyAuthUpLoad($parms);
$jsons = $result->CRM_companyAuthUpLoadResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]["error"];
}
}
//获取实名认证信息
if ($act == "getAuth") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("userProxyId" => $userProxyId);
$result = $client->CRM_getAuthInfo($parms);
$jsons = $result->CRM_getAuthInfoResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
$authArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
if ($json['AuthType'] == '0') {
$authArr['AuthType'] = $json['AuthType'];
$authArr['IAid'] = $json['IAid'];
$authArr['Authname'] = $json['Authname'];
$authArr['IDNumber'] = $json['IDNumber'];
$authArr['IDPic'] = $json['IDPic'];
$authArr['Age'] = $json['Age'];
$authArr['Address'] = $json['Address'];
$authArr['Tel'] = $json['Tel'];
$authArr['UserFace'] = $json['UserFace'];
$authArr['Occupation'] = $json['Occupation'];
$authArr['Seniority'] = $json['Seniority'];
$authArr['Company'] = $json['Company'];
$authArr['Memo'] = $json['Memo'];
$authArr['Certificate1'] = $json['Certificate1'];
$authArr['Certificate2'] = $json['Certificate2'];
$authArr['AddDate'] = $json['AddDate'];
$authArr['Status'] = $json['Status'];
} else {
$authArr['AuthType'] = $json['AuthType'];
$authArr['CAId'] = $json['CAId'];
$authArr['CompanyName'] = $json['CompanyName'];
$authArr['LicenseType'] = $json['LicenseType'];
$authArr['BusinessLicense'] = $json['BusinessLicense'];
$authArr['TaxCode'] = $json['TaxCode'];
$authArr['SocialCode'] = $json['SocialCode'];
$authArr['Bank'] = $json['Bank'];
$authArr['UserFace'] = $json['UserFace'];
$authArr['BankAccount'] = $json['BankAccount'];
$authArr['ContactName'] = $json['ContactName'];
$authArr['ContactPhone'] = $json['ContactPhone'];
$authArr['BusinessLicensePic'] = $json['BusinessLicensePic'];
$authArr['OrganizationCodePic'] = $json['OrganizationCodePic'];
$authArr['TaxRegistrationCertificatePic'] = $json['TaxRegistrationCertificatePic'];
$authArr['CorporationIDCardPic'] = $json['CorporationIDCardPic'];
$authArr['CorporationIDCardPic1'] = $json['CorporationIDCardPic1'];
$authArr['AddDate'] = $json['AddDate'];
$authArr['Status'] = $json['Status'];
}
$resultArr[] = $authArr;
}
echo json_encode($resultArr);
} else {
echo $jsonArray[0]['error'];
}
}
if ($act == "getUploadPath") {
$result = $client->getUploadPath();
$jsons = $result->getUploadPathResult;
echo $jsons;
}
//个人实名认证申请
if ($act == "AuthModifyApply") {
$authId = $_POST["authId"];
$parms = array("IAid" => $authId);
$result = $client->AuthModifyApply($parms);
$jsons = $result->AuthModifyApplyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]['error'];
}
}
//企业实名认证申请
if ($act == "CAuthModifyApply") {
$authId = $_POST["authId"];
$parms = array("CAId" => $authId);
$result = $client->companyAuthModifyApply($parms);
$jsons = $result->companyAuthModifyApplyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]['error'];
}
}
//收藏/删除 厂家
if ($act == "collect") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : "0";
$status = isset($_POST["status"]) ? $_POST["status"] : "0";
$parms = array("userProxyId" => $userProxyId, "factoryId" => $factoryId, "status" => $status);
$result = $client->C_factoryCollect($parms);
$jsons = $result->C_factoryCollectResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo $jsonArray[0]['error'];
}
}
//收藏/删除 产品
if ($act == "productCollect") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$productId = isset($_POST["productId"]) ? $_POST["productId"] : "0";
$status = isset($_POST["status"]) ? $_POST["status"] : "0";
$parms = array("userProxyId" => $userProxyId, "productId" => $productId, "status" => $status);
$result = $client->C_productCollect($parms);
$jsons = $result->C_productCollect;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo "Failure";
}
}
//获取该厂家状态
if ($act == "collectState") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : "0";
$parms = array("userProxyId" => $userProxyId, "factoryid" => $factoryId);
$result = $client->C_getCollectState($parms);
$jsons = $result->C_getCollectStateResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo true;
} else {
echo false;
}
}
//获取该产品状态
if ($act == "productCollectState") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$productId = isset($_POST["productId"]) ? $_POST["productId"] : "0";
$parms = array("userProxyId" => $userProxyId, "productId" => $productId);
$result = $client->C_getProductCollectState($parms);
$jsons = $result->C_getProductCollectStateResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo true;
}
else {
echo false;
}
}
//获取我收藏的厂家
if ($act == "myCollect") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("userProxyId" => $userProxyId);
$result = $client->C_getMyCollect($parms);
$jsons = $result->C_getMyCollectResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
$CollectArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$CollectArr['FactoryId'] = $json['FactoryId'];
$CollectArr['Abbreviation'] = $json['Abbreviation'];
$CollectArr['ListPic'] = $json['ListPic'];
$resultArr[] = $CollectArr;
}
echo json_encode($resultArr);
} else {
echo false;
}
}
////获取我收藏的产品
//if ($act == "myProductCollect") {
// session_start();
// $userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
// $parms = array("userProxyId" => $userProxyId);
// $result = $client->C_getMyProductCollect($parms);
// $jsons = $result->C_getMyProductCollectResult;
// $jsonArray = json_decode($jsons, TRUE);
// $totalCount = $jsonArray[0]['totalCount'];
// $success = $jsonArray[0]['success'];
// $data = $jsonArray[0]['data'];
// if ($totalCount > 0 && $success == true) {
// $PCollectArr = array();
// $resultArr = array();
// foreach ($jsonArray[0]['data'] as $json) {
// $PCollectArr['ProductId'] = $json['ProductId'];
// $PCollectArr['ProductName'] = $json['ProductName'];
// $PCollectArr['PicUrl'] = $json['PicUrl'];
// $resultArr[] = $PCollectArr;
// }
// echo json_encode($resultArr);
// } else {
// echo false;
// }
//}
//用户信息修改申请
if ($act == "userInfoModifyApply") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("userProxyId" => $userProxyId);
$result = $client->PD_userInfoModifyApply($parms);
$jsons = $result->PD_userInfoModifyApplyResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
} else {
echo fail;
}
}
//品牌墙信息
if ($act == "brandWall") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 0;
$typeId = isset($_GET["typeId"]) ? $_GET["typeId"] : 0;
$getAll = isset($_GET["getAll"]) ? $_GET["getAll"] : 0;
$subTypeId = isset($_GET["subTypeId"]) ? $_GET["subTypeId"] : 0;
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 1;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 30;
$parms = array("seriesId" => $seriesId, "typeId" => $typeId, "subTypeId" => $subTypeId, 'getAll' => $getAll, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
$result = $client->PD_getFactroyListPage($parms);
// var_dump($result);
$jsons = $result->PD_getFactroyListPageResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
// echo $factoryId;
// die();
// echo $success;
// die();
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
// var_dump($data);
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['ListPic'] = $json['ListPic'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//主页楼层信息
if ($act == "floorWall") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 1;
$parms = array("seriesId" => $seriesId);
$result = $client->PD_getTypeBySeriesId($parms);
//var_dump($result);
$jsons = $result->PD_getTypeBySeriesIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['TypeId'] = $json['TypeId'];
$serachArr['TypeName'] = $json['TypeName'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//2F
if ($act == "floorWall1") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 2;
$parms = array("seriesId" => $seriesId);
$result = $client->PD_getTypeBySeriesId($parms);
//var_dump($result);
$jsons = $result->PD_getTypeBySeriesIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['TypeId'] = $json['TypeId'];
$serachArr['TypeName'] = $json['TypeName'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//3F
if ($act == "floorWall2") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 3;
$parms = array("seriesId" => $seriesId);
$result = $client->PD_getTypeBySeriesId($parms);
//var_dump($result);
$jsons = $result->PD_getTypeBySeriesIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['TypeId'] = $json['TypeId'];
$serachArr['TypeName'] = $json['TypeName'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//4F
if ($act == "floorWall3") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 4;
$parms = array("seriesId" => $seriesId);
$result = $client->PD_getTypeBySeriesId($parms);
$jsons = $result->PD_getTypeBySeriesIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['TypeId'] = $json['TypeId'];
$serachArr['TypeName'] = $json['TypeName'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//厂家列表
if ($act == "factoryListByTypes") {
$serach = isset($_POST["search"]) ? $_POST["search"] : "";
$seriesId = isset($_POST["seriesId"]) ? $_POST["seriesId"] : 0;
$typeIds = isset($_POST["typeIds"]) ? $_POST["typeIds"] : "";
$subTypeId = isset($_POST["subTypeId"]) ? $_POST["subTypeId"] : 0;
$city = isset($_POST["city"]) ? $_POST["city"] : "";
$district = isset($_POST["district"]) ? $_POST["district"] : "";
$town = isset($_POST["town"]) ? $_POST["town"] : "";
$getAll = isset($_POST["getAll"]) ? $_POST["getAll"] : 0;
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 1;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 20;
$parms = array("search" => $search, "seriesId" => $seriesId, "typeIds" => $typeIds, "subTypeId" => $subTypeId, "city" => $city, "district" => $district, "town" => $town, "getAll" => $getAll, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
$result = $client->PD_getFactroyListPageTypes($parms);
$jsons = $result->PD_getFactroyListPageTypesResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
// $serachArr['seriesId'] = $json['seriesId'];
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['BusinessScope'] = $json['BusinessScope'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//系列
if ($act == "factorytype") {
$result = $client->PD_ProductType();
$jsons = $result->PD_ProductTypeResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
//var_dump($json['id']);
$serachArr['SeriesId'] = $json['SeriesId'];
$serachArr['SeriesName'] = $json['SeriesName'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//分类
if ($act == "classify") {
$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : '';
$parms = array("seriesId" => $seriesId);
$result = $client->PD_getTypeBySeriesId($parms);
$jsons = $result->PD_getTypeBySeriesIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['TypeId'] = $json['TypeId'];
$serachArr['TypeName'] = $json['TypeName'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//获取城市session
if ($act == "factorycity") {
session_start();
$city = $_SESSION["city"];
echo $city;
}
//获取城市区域
if ($act == "factoryListCity") {
$city = isset($_POST["city"]) ? $_POST["city"] : "";
$parms = array("city" => $city);
$result = $client->PD_getDistrictByCity($parms);
//var_dump($result);
$jsons = $result->PD_getDistrictByCityResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['district'] = $json['district'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//获取街道
if ($act == "factoryListTown") {
$city = isset($_POST["city"]) ? $_POST["city"] : "";
$district = isset($_POST["district"]) ? $_POST["district"] : "";
$parms = array("city" => $city, "district" => $district);
//var_dump($parms);
$result = $client->PD_getTownByDistrict($parms);
//var_dump($result);
$jsons = $result->PD_getTownByDistrictResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['town'] = $json['town'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
else{
echo 'Failure';
}
}
if ($act == "productlistType") {
$SeriesId = isset($_POST["SeriesId"]) ? $_POST["SeriesId"] : '';
$parms = array("SeriesId" => $SeriesId);
$result = $client->getFactoryListPY($parms);
$jsons = $result->getFactoryListPYResult;
$jsonArray = json_decode($jsons, TRUE);
//var_dump($jsonArray[0]['data']);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['FstPY'] = $json['FstPY'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['ListPic'] = $json['ListPic'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//获取产品
if ($act == "product") {
$searchText = isset($_POST["searchText"]) ? $_POST["searchText"] : '';
$factoryIds = isset($_POST["factoryIds"]) ? $_POST["factoryIds"] : '';
$seriesId = isset($_POST["seriesId"]) ? $_POST["seriesId"] : '';
$typeId = isset($_POST["typeId"]) ? $_POST["typeId"] : '';
$subTypeId = isset($_POST["subTypeId"]) ? $_POST["subTypeId"] : '';
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : '';
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 1;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 30;
$parms = array("searchText" => $searchText, "factoryIds" => $factoryIds, "seriesId" => $seriesId, "userProxyId" => $userProxyId, "typeId" => $typeId, "subTypeId" => $subTypeId, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
// var_dump($parms);
$result = $client->PD_getProductByFids($parms);
$jsons = $result->PD_getProductByFidsResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['recordCount'] = $totalCount;
$serachArr['productName'] = $json['productName'];
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['Type'] = $json['Type'];
$serachArr['picUrl'] = $json['picUrl'];
$serachArr['productId'] = $json['productId'];
$serachArr['subTypeId'] = $json['subTypeId'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['productStandard'] = $json['productStandard'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//获取产品详情
if ($act == "factoryDetail") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : '';
$productId = isset($_POST["productId"]) ? $_POST["productId"] : '';
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : '';
$parms = array("factoryId" => $factoryId, "productId" => $productId, "userProxyId" => $userProxyId);
$result = $client->PD_getProductInfo($parms);
$jsons = $result->PD_getProductInfoResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['productName'] = $json['productName'];
$serachArr['memo'] = base64_decode($json['memo']);
$serachArr['productStandard'] = $json['productStandard'];
$serachArr['productPic'] = $json['productPic'];
$serachArr['FactoryName'] = $json['FactoryName'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//根据厂商获取店铺信息
if ($act == "getShopInfo") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : '';
$parms = array("factoryId" => $factoryId);
// var_dump($parms);
$result = $client->PD_getProductTypeByfid($parms);
$jsons = $result->PD_getProductTypeByfidResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['typeName'] = $json['typeName'];
$serachArr['typeId'] = $json['typeId'];
// $serachArr['Slogan'] = $json['Slogan'];
// $serachArr['Address'] = $json['Address'];
// $serachArr['Telphone'] = $json['Telphone'];
// $serachArr['Logo'] = $json['Logo'];
// $serachArr['Banner'] = $json['Banner'];
// $serachArr['Email'] = $json['Email'];
// $serachArr['Website'] = $json['Website'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
//echo success;
echo json_encode($resultArr);
}
}
//获取厂家logo
if ($act == "factoryLogo") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : '';
//$seriesId = isset($_GET["seriesId"]) ? $_GET["seriesId"] : 1;
$parms = array("factoryId" => $factoryId);
$result = $client->PD_getFactoryInfoById($parms);
//var_dump($result);
$jsons = $result->PD_getFactoryInfoByIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['typeName'] = $json['typeName'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['Slogan'] = $json['Slogan'];
$serachArr['Address'] = $json['Address'];
$serachArr['Telphone'] = $json['Telphone'];
$serachArr['Logo'] = $json['Logo'];
$serachArr['Banner'] = $json['Banner'];
$serachArr['Email'] = $json['Email'];
$serachArr['Website'] = $json['Website'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//系列列表
if ($act == "factoryInfoType") {
$SeriesId = isset($_POST["SeriesId"]) ? $_POST["SeriesId"] : '';
//var_dump($SeriesId);
$parms = array("seriesId" => $SeriesId);
$result = $client->PD_getTypeBySeriesId($parms);
//var_dump($result);
$jsons = $result->PD_getTypeBySeriesIdResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$factoryId = $jsonArray[0]['factoryId'];
$serachArr = array();
$resultArr = array();
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['TypeId'] = $json['TypeId'];
$serachArr['TypeName'] = $json['TypeName'];
if ($json['subType'] != null) {
$serachArr['subType'] = $json['subType'];
} else {
$serachArr['subType'] = "";
}
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//获取业主信息
if ($act == "FindOwner") {
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : '';
$workType = isset($_POST["workType"]) ? $_POST["workType"] : '';
$provinceName = isset($_POST["provinceName"]) ? $_POST["provinceName"] : '';
$cityName = isset($_POST["cityName"]) ? $_POST["cityName"] : '';
$districtName = isset($_POST["districtName"]) ? $_POST["districtName"] : '';
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : '';
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : '';
$parms = array("userProxyId" => $userProxyId, "workType" => $workType, "provinceName" => $provinceName, "cityName" => $cityName, "districtName" => $districtName, "pageIndex" => $pageIndex, "pageSize" => $pageSize);
// var_dump($parms);
$result = $client->PE_getMRList($parms);
$jsons = $result->PE_getMRListResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['recordCount'] = $totalCount;
$serachArr['MRId'] = $json['MRId'];
$serachArr['ownerName'] = $json['ownerName'];
$serachArr['ownerPhone'] = $json['ownerPhone'];
$serachArr['workType'] = $json['workType'];
$serachArr['provinceName'] = $json['provinceName'];
$serachArr['cityName'] = $json['cityName'];
$serachArr['districtName'] = $json['districtName'];
$serachArr['townName'] = $json['townName'];
$serachArr['address'] = $json['address'];
$serachArr['UserFace'] = $json['UserFace'];
$serachArr['description'] = $json['description'];
$serachArr['createDate'] = $json['createDate'];
$serachArr['clickCount'] = $json['clickCount'];
$serachArr['state'] = $json['state'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo json_encode($resultArr);
}
}
//获取水电工信息
if ($act == "FindWorker") {
$workType = isset($_POST["workType"]) ? $_POST["workType"] : '';
$provinceName = isset($_POST["provinceName"]) ? $_POST["provinceName"] : '';
$cityName = isset($_POST["cityName"]) ? $_POST["cityName"] : '';
$districtName = isset($_POST["districtName"]) ? $_POST["districtName"] : '';
$parms = array("workType" => $workType, "provinceName" => $provinceName, "cityName" => $cityName, "districtName" => $districtName);
// var_dump($parms);
$result = $client->PE_getPEList($parms);
$jsons = $result->PE_getPEListResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['Tel'] = $json['Tel'];
$serachArr['userProxyId'] = $json['userProxyId'];
$serachArr['username'] = $json['username'];
$serachArr['Seniority'] = $json['Seniority'];
$serachArr['Memo'] = $json['Memo'];
$serachArr['workType'] = $json['workType'];
$serachArr['provinceName'] = $json['provinceName'];
$serachArr['UserFace'] = $json['UserFace'];
$serachArr['cityName'] = $json['cityName'];
$serachArr['districtName'] = $json['districtName'];
$serachArr['townName'] = $json['townName'];
$serachArr['address'] = $json['address'];
$serachArr['ClickCount'] = $json['ClickCount'];
$resultArr[] = $serachArr;
}
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo json_encode($resultArr);
}
}
//业主发布信息
if ($act == "OwnerRegister") {
$userProxyId = $_POST["userProxyId"];
$strJson = $_POST["strJson"];
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client->PE_insertMR($parms);
$jsons = $result->PE_insertMRResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($success == true) {
echo "_yes";
} else {
echo "_no";
}
}
//确认找到工人
if ($act == "ClickWorker") {
$mrId = $_POST["mrId"];
$parms = array("mrId" => $mrId);
$result = $client->PE_setCompleated($parms);
$jsons = $result->PE_setCompleatedResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($success == true) {
echo "_yes";
} else {
echo "_no";
}
}
//确认找到工人
if ($act == "worker_click") {
$type = $_POST["type"];
$userProxyId = $_POST["userProxyId"];
$mrId = $_POST["mrId"];
$parms = array("type" => $type, "userProxyId" => $userProxyId, "mrId" => $mrId);
$result = $client->PE_clickCountAdd($parms);
$jsons = $result->PE_clickCountAddResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo "_yes";
} else {
echo "_no";
}
}
//厂商产品推荐
if ($act == "Recommend") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : '';
$parms = array("factoryId" => $factoryId);
$result = $client->PD_RecommendProductByFid($parms);
$jsons = $result->PD_RecommendProductByFidResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['ProductName'] = $json['ProductName'];
$serachArr['ProductId'] = $json['ProductId'];
$serachArr['picUrl'] = $json['picUrl'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//热门产品
if ($act == "HotDetail") {
$factoryId = isset($_POST["factoryId"]) ? $_POST["factoryId"] : '';
$num = isset($_POST["num"]) ? $_POST["num"] : 3;
$parms = array("factoryId" => $factoryId,"num" => $num);
$result = $client->PD_hotProdctByFid($parms);;
$jsons = $result->PD_hotProdctByFidResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['ProductName'] = $json['ProductName'];
$serachArr['ProductId'] = $json['ProductId'];
$serachArr['picUrl'] = $json['picUrl'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//获取个人信息
if ($act == "personal") {
$type = isset($_POST["type"]) ? $_POST["type"] : '';
$id = isset($_POST["id"]) ? $_POST["id"] : '';
$listUserId = isset($_POST["listUserId"]) ? $_POST["listUserId"] : '';
$parms = array("id" => $id,"type" => $type,"userProxyId" =>$listUserId);
$result = $client->PE_getPhoneNumber($parms);;
$jsons = $result->PE_getPhoneNumberResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['phoneNumber'] = $json['phoneNumber'];
$serachArr['name'] = $json['name'];
$serachArr['workType'] = $json['workType'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//删除工人
if ($act == "DelectWorker") {
$mrId = $_POST["mrId"];
$parms = array("mrId" => $mrId);
$result = $client->PE_deleteMR($parms);
$jsons = $result->PE_deleteMRResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($success == true) {
echo "_yes";
} else {
echo "_no";
}
}
//判断是否查看过信息
if ($act == "check_state") {
$type = isset($_POST["type"]) ? $_POST["type"] : '';
$id = isset($_POST["id"]) ? $_POST["id"] : '';
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : '';
$parms = array("type" => $type, "userProxyId" => $userProxyId, "id" => $id);
$result = $client->PE_getCheckState($parms);
$jsons = $result->PE_getCheckStateResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$false = $jsonArray[0]['false'];
$error = $jsonArray[0]['error'];
if ($totalCount > 0 && $success == true) {
echo "_success";
} else {
echo "_false";
}
}
//注册验证用户是否存在
if ($act == "check_user") {
$phoneNumber = isset($_POST["phoneNumber"]) ? $_POST["phoneNumber"] : '';
$parms = array("phoneNumber" => $phoneNumber);
$result = $client->userExist($parms);
$jsons = $result->userExistResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$error = $jsonArray[0]['error'];
if ($success == false) {
echo "_yes";
} else {
echo "_no";
}
}
//订单投诉
if($act == "OrderComplain"){
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : '';
$OrderId = isset($_POST["OrderId"]) ? $_POST["OrderId"] : '';
$OrderNo = isset($_POST["OrderNo"]) ? $_POST["OrderNo"] : '';
$ComplainContent = isset($_POST["ComplainContent"]) ? $_POST["ComplainContent"] : '';
$strJson = array("OrderId" => $OrderId, "OrderNo" => $OrderNo, "ComplainContent" => $ComplainContent);
$strJson = json_encode($strJson);
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client->order_Complain($parms);
$jsons = $result->order_ComplainResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo success;
}
}
//订单投诉列表
if($act == "Order_Complain_List"){
$userProxyId = isset($_POST["userProxyId"]) ? $_POST["userProxyId"] : '';
$state = isset($_POST["state"]) ? $_POST["state"] : '';
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : '';
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : '';
$parms = array("userProxyId" => $userProxyId,"state" => $state,"pageIndex" =>$pageIndex,"pageSize" =>$pageSize);
$result = $client->order_getComplainList($parms);;
$jsons = $result->order_getComplainListResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['OrderNo'] = $json['OrderNo'];
$serachArr['OrderDate'] = $json['OrderDate'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['CCDate'] = $json['CCDate'];
$serachArr['ComplainContent'] = $json['ComplainContent'];
$serachArr['State'] = $json['State'];
$serachArr['recordCount'] = $totalCount;
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
}
//获取我收藏的厂家
if ($act == "My_Collect") {
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("userProxyId" => $userProxyId);
$result = $client->C_getMyCollect($parms);
$jsons = $result->C_getMyCollectResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['OrderNo'] = $json['OrderNo'];
$serachArr['OrderDate'] = $json['OrderDate'];
$serachArr['FactoryId'] = $json['FactoryId'];
$serachArr['FactoryName'] = $json['FactoryName'];
$serachArr['CCDate'] = $json['CCDate'];
$serachArr['ListPic'] = $json['ListPic'];
$serachArr['Abbreviation'] = $json['Abbreviation'];
$serachArr['ComplainContent'] = $json['ComplainContent'];
$serachArr['State'] = $json['State'];
$serachArr['recordCount'] = $totalCount;
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//获取商品收藏
if($act == "myProductCollect"){
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$parms = array("userProxyId" => $userProxyId);
$result = $client->C_getMyProductCollect($parms);
$jsons = $result->C_getMyProductCollectResult;
$jsonArray = json_decode($jsons, TRUE);
$serachArr = array();
$resultArr = array();
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$serachArr['ProductId'] = $json['ProductId'];
$serachArr['ProductName'] = $json['ProductName'];
$serachArr['PicUrl'] = $json['PicUrl'];
$serachArr['FactoryId']= $json['FactoryId'];
$resultArr[] = $serachArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//提交物流地址
if($act == "logisticAddressSubmit"){
session_start();
$postAddressId = isset($_POST["postAddressId"]) ? $_POST["postAddressId"] : 0;
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : "0";
$type = isset($_POST["type"]) ? $_POST["type"] : 0;
$strJson = isset($_POST["strJson"]) ? $_POST["strJson"] : '';
$parms = array("postAddressId" => $postAddressId,"userProxyId" => $userProxyId,"type" => $type, "strJson" => $strJson);
$result = $client->logisticAddressSubmit($parms);
$jsons = $result->logisticAddressSubmitResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$LASArr['postAddressId'] = $json['postAddressId'];
$LASArr['lat'] = $json['lat'];
$LASArr['lng'] = $json['lng'];
$resultArr[] = $LASArr;
}
echo json_encode($resultArr);
}
else{
echo "Fa_" . $jsonArray[0]['error'];
}
}
//获取经纬度
if($act == "getLocCode"){
$city = isset($_POST["city"]) ? $_POST["city"] : 0;
$address = isset($_POST["address"]) ? $_POST["address"] : 0;
$parms = array("city" => $city,"address" => $address);
$result = $client -> getLocCode($parms);
$returnStr = $result-> getLocCodeResult;
if($returnStr != ""){
echo $returnStr;
}
else{
echo "Failure";
}
}
if($act == "GetDistanceMarkPrice"){
$nDepLng = isset($_POST["nDepLng"]) ? $_POST["nDepLng"] : "";
$nDepLat = isset($_POST["nDepLat"]) ? $_POST["nDepLat"] : "";
$nArrLng = isset($_POST["nArrLng"]) ? $_POST["nArrLng"] : "";
$nArrLat = isset($_POST["nArrLat"]) ? $_POST["nArrLat"] : "";
$dTonnage = isset($_POST["dTonnage"]) ? $_POST["dTonnage"] : "";
$dCubage = isset($_POST["dCubage"]) ? $_POST["dCubage"] : "";
$bLoad = isset($_POST["bLoad"]) ? $_POST["bLoad"] : FALSE;
$bUnload = isset($_POST["bUnload"]) ? $_POST["bUnload"] : FALSE;
$parms = array("nDepLng" => $nDepLng,"nDepLat" => $nDepLat, "nArrLng" => $nArrLng, "nArrLat" => $nArrLat, "dTonnage" => $dTonnage, "dCubage" => $dCubage, "bLoad" => $bLoad, "bUnload" => $bUnload);
$result = $client -> GetDistanceMarkPrices($parms);
$jsons = $result -> GetDistanceMarkPricesResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$PriceArr['total_distance'] = $json['total_distance'];
$PriceArr['total_duration'] = $json['total_duration'];
$PriceArr['total_tollover'] = $json['total_tollover'];
$PriceArr['total_prices'] = $json['total_prices'];
$resultArr[] = $PriceArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
if($act == "LogisticSubmit"){
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : 0;
$strJson = isset($_POST["strJson"]) ? $_POST["strJson"] : "";
$parms = array("userProxyId" => $userProxyId, "strJson" => $strJson);
$result = $client-> logisticSubmit($parms);
$jsons = $result-> logisticSubmitResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo "success";
}
else{
echo "Failure";
}
}
//获取曾用地址
if($act == "getLogisticAddr"){
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : 0;
$city = isset($_POST["city"]) ? $_POST["city"] : "";
$type = isset($_POST["type"]) ? $_POST["type"] : 0;
$parms = array("userProxyId" => $userProxyId, "city" => $city, "type" => $type);
$result = $client -> getlogsticAddr($parms);
$jsons = $result -> getlogsticAddrResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$addrArr['postAddressId'] = $json['postAddressId'];
$addrArr['provinceName'] = $json['provinceName'];
$addrArr['cityName'] = $json['cityName'];
$addrArr['districtName'] = $json['districtName'];
$addrArr['townName'] = $json['townName'];
$addrArr['postAddress'] = $json['postAddress'];
$addrArr['lng'] = $json['lng'];
$addrArr['lat'] = $json['lat'];
$addrArr['type'] = $json['type'];
$resultArr[] = $addrArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//获取物流列表
if($act == "getLogisticList"){
session_start();
$userProxyId = isset($_POST["userid"]) ? $_SESSION["userid"] : 0;
$type = isset($_POST["type"]) ? $_POST["type"] : 2;
$getGoodsCity = isset($_POST["getGoodsCity"]) ? $_POST["getGoodsCity"] : "";
$getGoodsDistrict = isset($_POST["getGoodsDistrict"]) ? $_POST["getGoodsDistrict"] : "";
$getGoodsTown = isset($_POST["getGoodsTown"]) ? $_POST["getGoodsTown"] : "";
$getGoodsAddr = isset($_POST["getGoodsAddr"]) ? $_POST["getGoodsAddr"] : "";
$sendGoodsCity = isset($_POST["sendGoodsCity"]) ? $_POST["sendGoodsCity"] : "";
$sendGoodsDistrict = isset($_POST["sendGoodsDistrict"]) ? $_POST["sendGoodsDistrict"] : "";
$sendGoodsTown = isset($_POST["sendGoodsTown"]) ? $_POST["sendGoodsTown"] : "";
$sendGoodsAddr = isset($_POST["sendGoodsAddr"]) ? $_POST["sendGoodsAddr"] : "";
$sortField = isset($_POST["sortField"]) ? $_POST["sortField"] : "";
$sortDeriction = isset($_POST["sortDeriction"]) ? $_POST["sortDeriction"] : "";
$weightRange = isset($_POST["weightRange"]) ? $_POST["weightRange"] : "";
$volumeRange = isset($_POST["volumeRange"]) ? $_POST["volumeRange"] : "";
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 1;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 10;
$parms = array("userProxyId" => $userProxyId, "type" => $type, "getGoodsCity" => $getGoodsCity,"getGoodsDistrict" => $getGoodsDistrict,"getGoodsTown" => $getGoodsTown,"getGoodsAddr" => $getGoodsAddr,"sendGoodsCity" => $sendGoodsCity,"sendGoodsDistrict" => $sendGoodsDistrict,"sendGoodsTown" => $sendGoodsTown,"sendGoodsAddr" => $sendGoodsAddr,"sortField" => $sortField,"sortDeriction" => $sortDeriction,"weightRange" => $weightRange,"volumeRange" => $volumeRange,"pageIndex" => $pageIndex,"pageSize" => $pageSize);
$result = $client -> logisticGetList($parms);
$jsons = $result -> logisticGetListResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$logisticArr['recordCount'] = $totalCount;
$logisticArr['logisticId'] = $json['logisticId'];
$logisticArr['logisticNo'] = $json['logisticNo'];
$logisticArr['ownerId'] = $json['ownerId'];
$logisticArr['ownerPhone'] = $json['ownerPhone'];
$logisticArr['ownerName'] = $json['ownerName'];
$logisticArr['ownerFace'] = $json['ownerFace'];
$logisticArr['grabUserId'] = $json['grabUserId'];
$logisticArr['grabUserPhone'] = $json['grabUserPhone'];
$logisticArr['grabUserName'] = $json['grabUserName'];
$logisticArr['grabUserFace'] = $json['grabUserFace'];
$logisticArr['getGoodsDistrict'] = $json['getGoodsDistrict'];
$logisticArr['getGoodsTown'] = $json['getGoodsTown'];
$logisticArr['getGoodsAddr'] = $json['getGoodsAddr'];
$logisticArr['sendGoodsDistrict'] = $json['sendGoodsDistrict'];
$logisticArr['sendGoodsTown'] = $json['sendGoodsTown'];
$logisticArr['sendGoodsAddr'] = $json['sendGoodsAddr'];
$logisticArr['getGoodsDate'] = $json['getGoodsDate'];
$logisticArr['sendGoodsDateStart'] = $json['sendGoodsDateStart'];
$logisticArr['sendGoodsDateEnd'] = $json['sendGoodsDateEnd'];
$logisticArr['goodsWeight'] = $json['goodsWeight'];
$logisticArr['goodsVolume'] = $json['goodsVolume'];
$logisticArr['goodsType'] = $json['goodsType'];
$logisticArr['addDate'] = $json['addDate'];
$logisticArr['myOffer'] = $json['myOffer'];
$logisticArr['fee'] = $json['fee'];
$logisticArr['state'] = $json['state'];
$resultArr[] = $logisticArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//获取物流列表
if($act == "getLogisticList_No"){
session_start();
$userProxyId = isset($_POST["userid"]) ? $_SESSION["userid"] : 0;
$type = isset($_POST["type"]) ? $_POST["type"] : 2;
$logisticNo = isset($_POST["logisticNo"]) ? $_POST["logisticNo"] : "";
$getGoodsCity = isset($_POST["getGoodsCity"]) ? $_POST["getGoodsCity"] : "";
$getGoodsDistrict = isset($_POST["getGoodsDistrict"]) ? $_POST["getGoodsDistrict"] : "";
$getGoodsTown = isset($_POST["getGoodsTown"]) ? $_POST["getGoodsTown"] : "";
$getGoodsAddr = isset($_POST["getGoodsAddr"]) ? $_POST["getGoodsAddr"] : "";
$sendGoodsCity = isset($_POST["sendGoodsCity"]) ? $_POST["sendGoodsCity"] : "";
$sendGoodsDistrict = isset($_POST["sendGoodsDistrict"]) ? $_POST["sendGoodsDistrict"] : "";
$sendGoodsTown = isset($_POST["sendGoodsTown"]) ? $_POST["sendGoodsTown"] : "";
$sendGoodsAddr = isset($_POST["sendGoodsAddr"]) ? $_POST["sendGoodsAddr"] : "";
$sortField = isset($_POST["sortField"]) ? $_POST["sortField"] : "";
$sortDeriction = isset($_POST["sortDeriction"]) ? $_POST["sortDeriction"] : "";
$weightRange = isset($_POST["weightRange"]) ? $_POST["weightRange"] : "";
$volumeRange = isset($_POST["volumeRange"]) ? $_POST["volumeRange"] : "";
$pageIndex = isset($_POST["pageIndex"]) ? $_POST["pageIndex"] : 1;
$pageSize = isset($_POST["pageSize"]) ? $_POST["pageSize"] : 10;
$parms = array("userProxyId" => $userProxyId, "type" => $type,"logisticNo" => $logisticNo, "getGoodsCity" => $getGoodsCity,"getGoodsDistrict" => $getGoodsDistrict,"getGoodsTown" => $getGoodsTown,"getGoodsAddr" => $getGoodsAddr,"sendGoodsCity" => $sendGoodsCity,"sendGoodsDistrict" => $sendGoodsDistrict,"sendGoodsTown" => $sendGoodsTown,"sendGoodsAddr" => $sendGoodsAddr,"sortField" => $sortField,"sortDeriction" => $sortDeriction,"weightRange" => $weightRange,"volumeRange" => $volumeRange,"pageIndex" => $pageIndex,"pageSize" => $pageSize);
$result = $client -> logisticGetList_No($parms);
$jsons = $result -> logisticGetList_NoResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$logisticArr['recordCount'] = $totalCount;
$logisticArr['logisticId'] = $json['logisticId'];
$logisticArr['logisticNo'] = $json['logisticNo'];
$logisticArr['ownerId'] = $json['ownerId'];
$logisticArr['ownerPhone'] = $json['ownerPhone'];
$logisticArr['ownerName'] = $json['ownerName'];
$logisticArr['ownerFace'] = $json['ownerFace'];
$logisticArr['grabUserId'] = $json['grabUserId'];
$logisticArr['grabUserPhone'] = $json['grabUserPhone'];
$logisticArr['grabUserName'] = $json['grabUserName'];
$logisticArr['grabUserFace'] = $json['grabUserFace'];
$logisticArr['getGoodsDistrict'] = $json['getGoodsDistrict'];
$logisticArr['getGoodsTown'] = $json['getGoodsTown'];
$logisticArr['getGoodsAddr'] = $json['getGoodsAddr'];
$logisticArr['sendGoodsDistrict'] = $json['sendGoodsDistrict'];
$logisticArr['sendGoodsTown'] = $json['sendGoodsTown'];
$logisticArr['sendGoodsAddr'] = $json['sendGoodsAddr'];
$logisticArr['getGoodsDate'] = $json['getGoodsDate'];
$logisticArr['sendGoodsDateStart'] = $json['sendGoodsDateStart'];
$logisticArr['sendGoodsDateEnd'] = $json['sendGoodsDateEnd'];
$logisticArr['goodsWeight'] = $json['goodsWeight'];
$logisticArr['goodsVolume'] = $json['goodsVolume'];
$logisticArr['goodsType'] = $json['goodsType'];
$logisticArr['addDate'] = $json['addDate'];
$logisticArr['myOffer'] = $json['myOffer'];
$logisticArr['fee'] = $json['fee'];
$logisticArr['state'] = $json['state'];
$resultArr[] = $logisticArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//物流抢单
if($act == "logisticGrab"){
session_start();
$userProxyId = isset($_SESSION["userid"]) ? $_SESSION["userid"] : 0;
$logisticId = isset($_POST["logisticId"]) ? $_POST["logisticId"] : 0;
$parms = array("userProxyId" => $userProxyId, "logisticId" => $logisticId);
$result = $client-> logisticGrab($parms);
$jsons = $result-> logisticGrabResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo "success";
}
else{
echo "Failure";
}
}
if($act == "logisticInfo"){
$logisticId = isset($_POST["logisticId"]) ? $_POST["logisticId"] : 0;
$parms = array("logisticId" => $logisticId);
$result = $client-> logisticGetInfo($parms);
$jsons = $result-> logisticGetInfoResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
foreach ($jsonArray[0]['data'] as $json) {
$logisticArr['logisticId'] = $json['logisticId'];
$logisticArr['logisticNo'] = $json['logisticNo'];
$logisticArr['ownerId'] = $json['ownerId'];
$logisticArr['ownerPhone'] = $json['ownerPhone'];
$logisticArr['ownerName'] = $json['ownerName'];
$logisticArr['ownerFace'] = $json['ownerFace'];
$logisticArr['grabUserId'] = $json['grabUserId'];
$logisticArr['grabUserPhone'] = $json['grabUserPhone'];
$logisticArr['grabUserName'] = $json['grabUserName'];
$logisticArr['grabUserFace'] = $json['grabUserFace'];
$logisticArr['getGoodsDistrict'] = $json['getGoodsDistrict'];
$logisticArr['getGoodsTown'] = $json['getGoodsTown'];
$logisticArr['getGoodsAddr'] = $json['getGoodsAddr'];
$logisticArr['sendGoodsDistrict'] = $json['sendGoodsDistrict'];
$logisticArr['sendGoodsTown'] = $json['sendGoodsTown'];
$logisticArr['sendGoodsAddr'] = $json['sendGoodsAddr'];
$logisticArr['getGoodsDate'] = $json['getGoodsDate'];
$logisticArr['getGoodsTime'] = $json['getGoodsTime'];
$logisticArr['sendGoodsDateStart'] = $json['sendGoodsDateStart'];
$logisticArr['sendGoodsDateEnd'] = $json['sendGoodsDateEnd'];
$logisticArr['goodsWeight'] = $json['goodsWeight'];
$logisticArr['goodsVolume'] = $json['goodsVolume'];
$logisticArr['goodsType'] = $json['goodsType'];
$logisticArr['goodsCharacter'] = $json['goodsCharacter'];
$logisticArr['goodsQuantity'] = $json['goodsQuantity'];
$logisticArr['goodsUnit'] = $json['goodsUnit'];
$logisticArr['goodsBeyond'] = $json['goodsBeyond'];
$logisticArr['goodsBeLoad'] = $json['goodsBeLoad'];
$logisticArr['goodsBeUnload'] = $json['goodsBeUnload'];
$logisticArr['remark'] = $json['remark'];
$logisticArr['referencePrice'] = $json['referencePrice'];
$logisticArr['addDate'] = $json['addDate'];
$logisticArr['myOffer'] = $json['myOffer'];
$logisticArr['fee'] = $json['fee'];
$logisticArr['state'] = $json['state'];
$resultArr[] = $logisticArr;
}
echo json_encode($resultArr);
}
else{
echo "Failure";
}
}
//加小费
if($act == "logisticFee"){
$logisticId = isset($_POST["logisticId"]) ? $_POST["logisticId"] : 0;
$fee = isset($_POST["fee"]) ? $_POST["fee"] : 0;
$parms = array("logisticId" => $logisticId, "fee" => $fee);
$result = $client-> logisticFee($parms);
$jsons = $result-> logisticFeeResult;
$jsonArray = json_decode($jsons, TRUE);
$totalCount = $jsonArray[0]['totalCount'];
$success = $jsonArray[0]['success'];
$data = $jsonArray[0]['data'];
if ($totalCount > 0 && $success == true) {
echo "success";
}
else{
echo "Failure";
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。