get('/user', function (Request $request) { return $request->user(); }); Route::any('login', 'Api\LoginController@login'); Route::any('test', 'Api\TestController@aa'); Route::any('getHeaderWord', 'Api\HeaderWordController@getHeaderWord'); //测试用 Route::any('pushLog', 'Api\TestController@pushLog'); Route::any('delLog', 'Api\TestController@delLog'); //文件获取 Route::any('uploadFiles/{file_name}', 'Api\FileUploadController@getFile'); //获取导出规则 Route::any('getExport/{file_name}','Api\ExportFileController@getExport'); Route::group(['middleware'=> ['checkLogin']],function ($route){ //oa $route->any('oaGetData', 'Api\OaController@oaGetData'); $route->any('getOperationList', 'Api\OperationLogController@getOperationList'); $route->any('createOaOrder', 'Api\OaController@createOaOrder'); $route->any('oaCheck', 'Api\OaController@oaCheck'); $route->any('oaOrderList', 'Api\OaController@oaOrderList'); $route->any('oaList', 'Api\OaController@oaList'); $route->any('oaDel', 'Api\OaController@oaDel'); $route->any('oaEdit', 'Api\OaController@oaEdit'); $route->any('oaDetail', 'Api\OaController@oaDetail'); $route->any('setOperationList', 'Api\OperationLogController@setOperationList'); $route->any('oaOrderState', 'Api\OaController@oaOrderState'); $route->any('oaGetTeamDetail', 'Api\OaController@oaGetTeamDetail'); $route->any('checkAllOver', 'Api\OaController@checkAllOver'); $route->any('oaCheckMove', 'Api\OaController@oaCheckMove'); $route->any('oaSubUserDetail', 'Api\OaController@oaSubUserDetail'); $route->any('oaSubRemark', 'Api\OaController@oaSubRemark'); $route->any('reportList', 'Api\OaController@reportList'); $route->any('reportCount', 'Api\OaController@reportCount'); $route->any('reportCheck', 'Api\OaController@reportCheck'); $route->any('reportTime', 'Api\OaController@reportTime'); //审批流参数 $route->any('oaParamGet','Api\OaController@oaParamGet'); //工作流 $route->any('workFlowEdit', 'Api\WorkFlowController@edit'); $route->any('workFlowDetail', 'Api\WorkFlowController@detail'); $route->any('workFlowList', 'Api\WorkFlowController@orderList'); $route->any('workFlowDel', 'Api\WorkFlowController@del'); $route->any('workFlowCreate', 'Api\WorkFlowController@create'); //触发审批 $route->any('checkAll', 'Api\CheckController@checkAll'); //文件上传统一方法 $route->any('uploadFile', 'Api\FileUploadController@uploadFile'); $route->any('uploadFileForKq', 'Api\FileUploadController@uploadFileForKq'); $route->any('menuAdd', 'Api\SysMenuController@add'); $route->any('menuEdit', 'Api\SysMenuController@edit'); $route->any('menuDel', 'Api\SysMenuController@del'); $route->any('menuList', 'Api\SysMenuController@menuList'); $route->any('menuMove', 'Api\SysMenuController@menuMove'); $route->any('roleAdd', 'Api\EmployeeController@roleAdd'); $route->any('roleEdit', 'Api\EmployeeController@roleEdit'); $route->any('roleDel', 'Api\EmployeeController@roleDel'); $route->any('roleList', 'Api\EmployeeController@roleList'); $route->any('roleDetail', 'Api\EmployeeController@roleDetail'); $route->any('roleMenu', 'Api\EmployeeController@roleMenu'); $route->any('departAdd', 'Api\EmployeeController@departAdd'); $route->any('departEdit', 'Api\EmployeeController@departEdit'); $route->any('departDel', 'Api\EmployeeController@departDel'); $route->any('departList', 'Api\EmployeeController@departList'); $route->any('departOaList', 'Api\EmployeeController@departOaList'); $route->any('employeeSampleEdit', 'Api\EmployeeController@employeeSampleEdit'); $route->any('employeeAdd', 'Api\EmployeeController@employeeAdd'); $route->any('employeeEdit', 'Api\EmployeeController@employeeEdit'); $route->any('employeeEditOther', 'Api\EmployeeController@employeeEditOther'); $route->any('employeeDel', 'Api\EmployeeController@employeeDel'); $route->any('employeeList', 'Api\EmployeeController@employeeList'); $route->any('employeeListQx', 'Api\EmployeeController@employeeListQx'); $route->any('employeeEditImg', 'Api\EmployeeController@employeeEditImg')->middleware('OssFileDeal'); $route->any('getEmployeeImg', 'Api\EmployeeController@getEmployeeImg'); $route->any('kqList', 'Api\KqController@kqList'); $route->any('kqCollect', 'Api\KqController@kqCollect'); $route->any('kqForLeaveAdd', 'Api\KqController@kqForLeaveAdd'); $route->any('kqForLeaveEdit', 'Api\KqController@kqForLeaveEdit'); $route->any('kqForLeaveDel', 'Api\KqController@kqForLeaveDel'); $route->any('kqForLeaveList', 'Api\KqController@kqForLeaveList'); $route->any('kqForOvertimeAdd', 'Api\KqController@kqForOvertimeAdd'); $route->any('kqForOvertimeEdit', 'Api\KqController@kqForOvertimeEdit'); $route->any('kqForOvertimeDel', 'Api\KqController@kqForOvertimeDel'); $route->any('kqForOvertimeList', 'Api\KqController@kqForOvertimeList'); //客户 $route->any('customerList', 'Api\CustomerController@customerList'); $route->any('customerEdit', 'Api\CustomerController@customerEdit')->middleware('OssFileDeal'); $route->any('customerAdd', 'Api\CustomerController@customerAdd')->middleware('OssFileDeal'); $route->any('customerDel', 'Api\CustomerController@customerDel')->middleware('OssFileDeal'); $route->any('customerDetail', 'Api\CustomerController@customerDetail'); //商机 $route->any('businessOpportunityList', 'Api\BusinessOpportunityController@BusinessOpportunityList'); $route->any('businessOpportunityEdit', 'Api\BusinessOpportunityController@BusinessOpportunityEdit')->middleware('OssFileDeal'); $route->any('businessOpportunityAdd', 'Api\BusinessOpportunityController@BusinessOpportunityAdd')->middleware('OssFileDeal'); $route->any('businessOpportunityDel', 'Api\BusinessOpportunityController@BusinessOpportunityDel')->middleware('OssFileDeal'); $route->any('businessOpportunityDetail', 'Api\BusinessOpportunityController@BusinessOpportunityDetail'); //跟进记录 $route->any('followUpRecordList', 'Api\FollowUpRecordController@followUpRecordList'); $route->any('followUpRecordEdit', 'Api\FollowUpRecordController@followUpRecordEdit')->middleware('OssFileDeal'); $route->any('followUpRecordAdd', 'Api\FollowUpRecordController@followUpRecordAdd')->middleware('OssFileDeal'); $route->any('followUpRecordDetail', 'Api\FollowUpRecordController@followUpRecordDetail'); $route->any('followUpRecordDel', 'Api\FollowUpRecordController@followUpRecordDel')->middleware('OssFileDeal'); //项目 $route->any('projectAdd', 'Api\ProjectController@add'); $route->any('projectEdit', 'Api\ProjectController@edit'); $route->any('projectDel', 'Api\ProjectController@del'); $route->any('projectList', 'Api\ProjectController@projectList'); $route->any('projectDetail', 'Api\ProjectController@projectDetail'); $route->any('projectAddStage', 'Api\ProjectController@addStage'); $route->any('projectEditStage', 'Api\ProjectController@editStage'); $route->any('projectDelStage', 'Api\ProjectController@delStage'); $route->any('projectStageList', 'Api\ProjectController@projectStageList'); $route->any('projectAddStageNode', 'Api\ProjectController@addStageNode'); $route->any('projectEditStageNode', 'Api\ProjectController@editStageNode'); $route->any('projectDelStageNode', 'Api\ProjectController@delStageNode'); $route->any('projectStageNodeList', 'Api\ProjectController@projectStageNodeList'); $route->any('projectAddStageNodeMission', 'Api\ProjectController@addStageNodeMission'); $route->any('projectEditStageNodeMission', 'Api\ProjectController@editStageNodeMission'); $route->any('projectDelStageNodeMission', 'Api\ProjectController@delStageNodeMission'); $route->any('projectStageNodeMissionList', 'Api\ProjectController@projectStageNodeMissionList'); $route->any('projectAddStageNodeMissionDetail', 'Api\ProjectController@addStageNodeMissionDetail'); $route->any('projectEditStageNodeMissionDetail', 'Api\ProjectController@editStageNodeMissionDetail'); $route->any('projectDelStageNodeMissionDetail', 'Api\ProjectController@delStageNodeMissionDetail'); $route->any('projectStageNodeMissionDetailList', 'Api\ProjectController@projectStageNodeMissionDetailList'); $route->any('projectSonData', 'Api\ProjectController@getSonData'); //导出 $route->any('exportFile', 'Api\ExportFileController@exportFile'); //获取考勤的图片 $route->get('/kq/image/{filename}', function ($filename) { $last_dir = explode('_',$filename)[0]; $path = storage_path('app/kq/'.date('Ymd',$last_dir).'/' . $filename); $path = $path.'.jpg'; if (!File::exists($path)) { abort(404); } $file = File::get($path); $type = File::mimeType($path); return response($file, 200)->header('Content-Type', $type); }); });