作者 李小龙

C端调整

@@ -58,28 +58,6 @@ protected function error($message = 'error', $status = 400, $data = []) @@ -58,28 +58,6 @@ protected function error($message = 'error', $status = 400, $data = [])
58 } 58 }
59 59
60 /** 60 /**
61 - * 响应response  
62 - * @param array $data  
63 - * @param int $code  
64 - * @param string $msg  
65 - * @param int $result_code  
66 - * @param string $type  
67 - */  
68 - public function responseA($data = [], $code = 200, $msg = 'success', $result_code = 200, $type = 'application/json')  
69 - {  
70 - $result = [  
71 - 'msg' => $msg,  
72 - 'code' => $code,  
73 - 'data' => $data,  
74 - ];  
75 - $header = [  
76 - 'Content-Type' => $type,  
77 - ];  
78 - $response = response($result, $result_code, $header);  
79 - throw new HttpResponseException($response);  
80 - }  
81 -  
82 - /**  
83 * 响应 61 * 响应
84 * @param null $msg 62 * @param null $msg
85 * @param int $code 63 * @param int $code
@@ -367,9 +345,7 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA @@ -367,9 +345,7 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA
367 //转发接口 345 //转发接口
368 $transmitUrl = env("TRANSMIT_URL"); 346 $transmitUrl = env("TRANSMIT_URL");
369 $resp = $this->httpPost($transmitUrl."api/selfSiteApi/",json_encode($req)); 347 $resp = $this->httpPost($transmitUrl."api/selfSiteApi/",json_encode($req));
370 - if ($resp["code"] == self::SUCCESS){  
371 - return $resp;  
372 - }else{ 348 + if ($resp["status"] != self::SUCCESS){
373 $dataJson = json_encode($req); 349 $dataJson = json_encode($req);
374 if (!file_exists(storage_path('logs/fail_req'))){ 350 if (!file_exists(storage_path('logs/fail_req'))){
375 mkdir(storage_path('logs/fail_req',0777,true)); 351 mkdir(storage_path('logs/fail_req',0777,true));