作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

合并分支 'wangxiaogang' 到 'master'

Wangxiaogang



查看合并请求 !29
@@ -33,20 +33,25 @@ class LoadController extends HomeBaseController @@ -33,20 +33,25 @@ class LoadController extends HomeBaseController
33 } 33 }
34 public function notify(){ 34 public function notify(){
35 35
36 - $RequestType = $_POST['RequestType'];  
37 - $RequestData = $_POST['RequestData'];  
38 - if(empty($RequestType)){  
39 - $this->error('error'); 36 + $data = file_get_contents('php://input');
  37 + $msg = explode("&", $data);
  38 + foreach ($msg as $k => $v) {
  39 + $p = explode("=", $v);
  40 + if ($p[0] == "RequestData") {
  41 + $result[$p[0]] = json_decode(urldecode($p[1]),true);
  42 + } else {
  43 + $result[$p[0]] = urldecode($p[1]);
40 } 44 }
41 - if($RequestType != 101){  
42 - $this->error('error');  
43 } 45 }
44 - $result = json_decode($RequestData,true);  
45 - cache('result',$result);  
46 - $bird = config('bird');  
47 - $date = date("Y-m-d H:i:s",time());  
48 - $data = '{ "EBusinessID": "test1472267", "UpdateTime": "'.$date.'", "Success": true, "Reason": ""}'; 46 + /*echo '<pre>';
  47 + print_r($res);exit;*/
  48 + $data = '{
  49 + "EBusinessID": "'.$result['RequestData']['EBusinessID'].'",
  50 + "UpdateTime": "'. date('Y-m-d H:i:s', time()) .'",
  51 + "Success": "true",
  52 + "Reason": ""
  53 + }';
49 cache('data',$data); 54 cache('data',$data);
50 - return $data; 55 + echo $data;
51 } 56 }
52 } 57 }