post(); $rid= "";$rname= ""; if(isset($param['token']) && $param['token']!=''){ $apply_id = GetUserInfo($param['token']); if(empty($apply_id)||$apply_id['code']!=0){ $rid= ""; $rname= ""; }else{ $rid= isset($apply_id["data"]['id']) ? $apply_id["data"]['id'] : ""; $rname= isset($apply_id["data"]['nickname']) ? $apply_id["data"]['nickname'] : ""; } } $server = $request->server(); $data=[ "uri_name"=>$server['REQUEST_URI'], "param"=>json_encode($param,JSON_UNESCAPED_UNICODE), "response"=>'', "action_id"=>$rid, "action_name"=>$rname, "addtime"=>date("Y-m-d H:i:s") ] ; Db::name("data_log")->insert($data); $response = $next($request); return $response; } public function end($response){ } }