作者 李小龙

C端调整

... ... @@ -58,28 +58,6 @@ protected function error($message = 'error', $status = 400, $data = [])
}
/**
* 响应response
* @param array $data
* @param int $code
* @param string $msg
* @param int $result_code
* @param string $type
*/
public function responseA($data = [], $code = 200, $msg = 'success', $result_code = 200, $type = 'application/json')
{
$result = [
'msg' => $msg,
'code' => $code,
'data' => $data,
];
$header = [
'Content-Type' => $type,
];
$response = response($result, $result_code, $header);
throw new HttpResponseException($response);
}
/**
* 响应
* @param null $msg
* @param int $code
... ... @@ -367,9 +345,7 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA
//转发接口
$transmitUrl = env("TRANSMIT_URL");
$resp = $this->httpPost($transmitUrl."api/selfSiteApi/",json_encode($req));
if ($resp["code"] == self::SUCCESS){
return $resp;
}else{
if ($resp["status"] != self::SUCCESS){
$dataJson = json_encode($req);
if (!file_exists(storage_path('logs/fail_req'))){
mkdir(storage_path('logs/fail_req',0777,true));
... ...