Commit 955a849f authored by 蒋林's avatar 蒋林

1. 海信系统

2. 账号密码错误提示
parent 035cb9ce
...@@ -43,7 +43,7 @@ class Galanz extends BaseController ...@@ -43,7 +43,7 @@ class Galanz extends BaseController
9 => ['u' => 'W75509335', 'p' => 'szwxh!755'], 9 => ['u' => 'W75509335', 'p' => 'szwxh!755'],
]; ];
$key = 8; $key = 0;
self::$testu = $account[$key]['u']; self::$testu = $account[$key]['u'];
self::$testp = $account[$key]['p']; self::$testp = $account[$key]['p'];
//self::$testp = urlencode(str_aes($account[5]['p'])); //self::$testp = urlencode(str_aes($account[5]['p']));
...@@ -53,7 +53,7 @@ class Galanz extends BaseController ...@@ -53,7 +53,7 @@ class Galanz extends BaseController
{ {
$sobj = $this->sourceGalanzObj(); $sobj = $this->sourceGalanzObj();
$order = $sobj->WorkOrderDetail('677beebf-ace7-4dc0-8a58-d2a4e7d3622'); $order = $sobj->searchOrder();
print_r($order); print_r($order);
} }
...@@ -62,12 +62,12 @@ class Galanz extends BaseController ...@@ -62,12 +62,12 @@ class Galanz extends BaseController
{ {
// $mail= '18611475060@163.com'; // $mail= '18611475060@163.com';
// $pwd = 'aimi1012'; // $pwd = 'aimi1012';
//
// $mail= 'weixiuhui1688@163.com';
// $pwd = 'wxh16888';
$mail = 'wxh__8888@163.com'; $mail= 'weixiuhui1688@163.com';
$pwd = 'WXH888888'; $pwd = 'wxh16888';
// $mail = 'wxh__8888@163.com';
// $pwd = 'WXH888888';
$code = phone_code($mail, $pwd); $code = phone_code($mail, $pwd);
......
<?php
/**
* Created by PhpStorm.
* User: LinJiangL
* Date: 16/11/18
* Time: 下午1:48
*/
/**
* Class Hisense
*
* @property SourceHisense SourceHisense
* @property ReceiveHisense ReceiveHisense
*/
class Hisense extends BaseController
{
public static $testu = '';
public static $testp = '';
protected static $apiUrl = 'http://wxh.pp.cn/';
public function __construct()
{
//ini_set('display_errors', 1);
parent::__construct();
self::$apiUrl = "http://{$_SERVER['HTTP_HOST']}/";
$account = [
0 => ['u' => 'gdjdhfzh1', 'p' => 'BBb66666'],
];
$key = 0;
self::$testu = $account[$key]['u'];
self::$testp = $account[$key]['p'];
}
public function test()
{
$sobj = $this->sourceObj();
$res = $sobj->InformationFeedbackList('');
print_r($res);
}
public function param()
{
$str = "mark=1&partner=869218&objectId=&mobPhoneNum=&startTime=2016-11-09&endTime=2016-11-29&printTypeName=&processType=&statusName=&orderStatus=";
parse_str($str, $r);
$str = '';
foreach ($r as $k => $v) {
$str .= "'{$k}' => {$v},<br/>";
}
echo $str;
}
protected function show($data)
{
echo "<pre>";
print_r($data);
}
protected function sourceObj()
{
$account = [
'username' => self::$testu,
'pwd' => self::$testp
];
$this->load->library('Source/SourceHisense', $account, 'SourceHisense');
return $this->SourceHisense;
}
protected function receiveObj()
{
$this->load->library('Receive/ReceiveHisense', null, 'ReceiveHisense');
return $this->ReceiveHisense;
}
}
\ No newline at end of file
<?php
require 'Receive.php';
class ReceiveHisense extends Receive
{
}
\ No newline at end of file
...@@ -50,11 +50,12 @@ class Source ...@@ -50,11 +50,12 @@ class Source
curl_setopt($curl, CURLOPT_COOKIEFILE, self::$cookieFilePath); curl_setopt($curl, CURLOPT_COOKIEFILE, self::$cookieFilePath);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post)); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
$result = curl_exec($curl); $result = curl_exec($curl);
$info = curl_getinfo($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE); $code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl); curl_close($curl);
$this->ReturnError($result, $url); $this->ReturnError($result, $url);
return ['code' => $code, 'data' => $result]; return ['code' => $code, 'info' => $info, 'data' => $result];
} }
protected function CurlPostHttps($url, $post, $headers, $type="") protected function CurlPostHttps($url, $post, $headers, $type="")
......
...@@ -20,6 +20,9 @@ class SourceGalanz extends Source ...@@ -20,6 +20,9 @@ class SourceGalanz extends Source
self::$cookieFilePath = PUBDIR . "cookie/galanz_". self::$account['username'] .".cookie"; self::$cookieFilePath = PUBDIR . "cookie/galanz_". self::$account['username'] .".cookie";
self::$captchaFilePath = PUBDIR . "captcha/galanz_". self::$account['username'] .".gif"; self::$captchaFilePath = PUBDIR . "captcha/galanz_". self::$account['username'] .".gif";
//debug
self::$debug = false;
//判断是否登陆 //判断是否登陆
$result = $this->IsLogin(); $result = $this->IsLogin();
if ($result == false) { if ($result == false) {
...@@ -84,8 +87,17 @@ class SourceGalanz extends Source ...@@ -84,8 +87,17 @@ class SourceGalanz extends Source
} }
$headers = $this->Header($loginUrl); $headers = $this->Header($loginUrl);
$result = $this->CurlPost($loginUrl, $post, $headers);
$result['data'] = gzdecode($result['data']);
return $this->CurlPost($loginUrl, $post, $headers); //debug
$this->Debug('login', $result);
if (stripos($result['data'], '用户密码不正确') !== false) {
return_msg(false, '用户密码不正确(-10001)');
}
return $result;
} }
/** /**
......
This diff is collapsed.
...@@ -467,11 +467,11 @@ class SourceSuning extends Source ...@@ -467,11 +467,11 @@ class SourceSuning extends Source
break; break;
case "badPassword.msg1": case "badPassword.msg1":
return_msg(false, "您输入的账户名与密码不匹配,请重新输入!"); return_msg(false, "您输入的账户名与密码不匹配,请重新输入!(-10001)");
break; break;
case "badPassword.msg2": case "badPassword.msg2":
return_msg(false, "您输入的账户名与密码不匹配,请重新输入!重试次数过多,账号将会被锁定。"); return_msg(false, "您输入的账户名与密码不匹配,请重新输入!重试次数过多,账号将会被锁定。(-10001)");
break; break;
case "badVerifyCode": case "badVerifyCode":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment