1 Star 0 Fork 2

tongmingyong/品贷网

forked from 徐子玉/品贷网 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
api.php 115.35 KB
一键复制 编辑 原始数据 按行查看 历史
徐子玉 提交于 2017-07-05 11:21 . + pdw
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035
<?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";
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mingyong50/pdw.git
[email protected]:mingyong50/pdw.git
mingyong50
pdw
品贷网
master

搜索帮助