添加调试

dev
vine_liutk 2023-07-18 12:29:54 +08:00
parent 765660a7aa
commit 64da2caa8a
1 changed files with 11 additions and 7 deletions

View File

@ -30,21 +30,25 @@ class ApiCustomToken
//拿出sign剩下的参数按照key排序, 拼接
$postSign = Arr::get($postData, 'sign', '');
//记录请求日志
$log = new ThirdLog();
$log->app_id = $appKey;
$log->api_path = $request->path();
$log->request_params = json_encode($postData);
if(empty($appKey) || empty($postSign) || empty($timeStamp)){
$resData = [
'respCd' => '02',
'respMsg' => '参数缺失',
];
$log->sign_status = 0;
$log->http_code = 400;
$log->response_params = json_encode($resData);
$log->save();
return response()->json($resData, 400);
}
//记录请求日志
$log = new ThirdLog();
$log->app_id = $appKey;
$log->api_path = $request->path();
$log->request_params = json_encode($postData);
unset($postData['sign']);
ksort($postData);