liumiao
2021-04-01 07e5b3fd4ec38bae10c11d011b75c8d5c5c0d780
commit | author | age
b37604 1 <?php
Z 2 use Illuminate\Http\Request;
3
4 $api = app('Dingo\Api\Routing\Router');
5 /*
6 |--------------------------------------------------------------------------
7 | API Routes
8 |--------------------------------------------------------------------------
9 |
10 | Here is where you can register API routes for your application. These
11                              | is assigned the "api" middleware group. Enjoy building your API!
12 |
13 */
14
15 ## TODO:V1版本
16 $api->version('v1', [
17     'namespace' => 'App\Http\Controllers\Api\v1'
6e0470 18 ], function ($api) {
b37604 19     $check = env('CHECK_API', false);
Z 20     $middleware = [];
21     if($check)
22     {
23         $middleware = [
24             'dcecryptParam',    //基础参数检测
25             'checkHeader',      //检测header
26             'checkSign',        //签名检测
27             'checkLogin',       //检查登录
28             'accessLog'
29         ];
30     }
31
32     /*
33     |--------------------------------------------------------------------------
34     | APP 接口 分组
35     |
36     | 中间件依此为 : 参数解密 - header验证 - 签名验证 - 登录信息处理
37     |--------------------------------------------------------------------------
38     */
6e0470 39     $api->group(['middleware' => $middleware, 'prefix' => 'v1'], function ($api) {
b37604 40         $api->post('/test', 'TestController@demo');
6e0470 41         //======================================start zzy ======================================
Z 42         //==人脸管理
4639b8 43         $api->post('/face/regFace', 'FaceController@regFace');//注册人脸
Z 44         $api->post('/face/compareFace', 'FaceController@compareFace');//人脸比对
45         $api->post('/face/signInSet', 'FaceController@signInSet');//签到设置
432b4d 46         $api->post('/face/punchTheClock', 'FaceController@punchTheClock');//打卡
780a2a 47         $api->post('/face/attendanceList', 'FaceController@attendanceList');//考勤列表
432b4d 48         $api->post('/face/signInDetails', 'FaceController@signInDetails');//签到详情
673175 49         $api->post('/face/searchPhoneStudent', 'FaceController@searchPhoneStudent');//学院搜索
42393d 50         $api->post('/face/getFaceInfo', 'FaceController@getFaceInfo');//人脸详情
7585f4 51         $api->post('/face/supplement', 'FaceController@supplement');//人工补录
42393d 52
de53aa 53         //==我的
4639b8 54         $api->post('/person/menuList', 'PersonController@getMenuList');//我的菜单
673175 55         $api->post('/person/userInfo', 'PersonController@userInfo');//我的菜单
6e0470 56         //==系统相关
2ea595 57         $api->post('/system/startup', 'SystemController@startup');              //启动页接口
Z 58         $api->post('/system/menuList', 'SystemController@bottomMenu');          //底部菜单
59         $api->post('/system/checkUpgrade', 'SystemController@checkUpgrade');    //检测更新
6e0470 60         //======================================end zzy ======================================
5af012 61
L 62         /******************************* start lium ****************************************/
801cd8 63         # 登陆
c558c8 64         $api->post('/system/login', 'SystemController@login');                      //登陆
L 65         $api->post('/system/getRoleList', 'SystemController@roleList');             //用户登录角色
66
67         # 课表
3cd5ba 68         $api->post('/ClassSchedule/getClassScheduleList', 'ClassScheduleController@classScheduleList');             //课表列表
L 69         $api->post('/ClassSchedule/getClassScheduleDetails', 'ClassScheduleController@classScheduleDetails');       //课表详情
70         $api->post('/ClassSchedule/setClassHour', 'ClassScheduleController@updateClassHour');                       //修改课时
933a56 71         $api->post('/ClassSchedule/getHumanFaceSignInList', 'ClassScheduleController@humanFaceSignInList');         //人脸打卡list
e60d03 72         $api->post('/ClassSchedule/getStudentsCourse', 'ClassScheduleController@studentsCourse');                   //学员课程
801cd8 73
a989b7 74         # 请假
L 75         $api->post('/AskForLeave/getAskForLeaveList', 'AskForLeaveController@askForLeaveList');                     //请假列表
76         $api->post('/AskForLeave/addAskForLeave', 'AskForLeaveController@addAskForLeave');                          //审批请假
77
5af012 78         /*******************************  end  lium ****************************************/
5c42b4 79
C 80         /******************************* start Cuiyb ****************************************/
81         $api->post('/Usre/userList', 'UsreController@userList');#学员列表
82         $api->post('/Usre/myUserList', 'UsreController@myUserList');#我的-学员列表
3ae5eb 83         $api->post('/Usre/userInfo', 'UsreController@userInfo');#学员详情
C 84         $api->post('/Usre/userClassList', 'UsreController@userClassList');#学员班级列表
5c42b4 85         /******************************* end Cuiyb ****************************************/
b37604 86     });
Z 87 });
88
89
90
91