web.php 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Application Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register all of the routes for an application.
  8. | It is a breeze. Simply tell Lumen the URIs it should respond to
  9. | and give it the Closure to call when that URI is requested.
  10. |
  11. */
  12. $router->get('/', ['as' => 'index', 'uses' => 'WebController@index']);
  13. $router->get('/app', ['as' => 'app', 'uses' => 'AppController@index']);
  14. $router->get('/frontend', ['as' => 'frontend', 'uses' => 'WebController@frontend']);
  15. $router->get('/code',['as' => 'code','uses' => 'AppController@getUserInfo']);
  16. $router->get('/pk/room/{id}', ['as' => 'pk_room', 'uses' => 'WebController@room']);
  17. $router->get('/corp/activity',['as' => 'corp_activity', 'uses' => 'CorpController@activityList']);
  18. $router->get('/my/join',['as' => 'my_join', 'uses' => 'CorpController@joinActivity']);
  19. $router->get('/dingtalk/person/activity',['as' => 'dingtalk_person_activity', 'uses' => 'PersonDingtalkController@activityList']);
  20. $router->get('/dingtaok/person/my/join',['as' => 'dingtalk_person_my_join', 'uses' => 'PersonDingtalkController@joinActivity']);
  21. $router->get('/dingtalk',['as' => 'dingtalk_activity_url', 'uses' => 'DingtalkController@index']);
  22. //前端接口
  23. $router->group(["prefix" => 'api'], function () use ($router) {
  24. $router->get('/user/info', ['as' => 'userInfo', 'uses' => 'ApiGuestController@userInfo']);
  25. $router->get('/base/info', ['as' => 'baseInfo', 'uses' => 'ApiGuestController@baseInfo']);
  26. $router->get('/base/class', ['as' => 'class', 'uses' => 'ApiGuestController@getClass']);
  27. $router->get('/other/activitys', ['as' => 'other_activity', 'uses' => 'ApiGuestController@otherActivitys']);
  28. $router->get('/pk/room/info',['as' => 'roomInfo', 'uses' => 'ApiGuestController@room']);
  29. $router->post('/sms/verifycode/send', ['as' => 'sendSms', 'uses' => 'ApiGuestController@sendsms']);
  30. $router->post('/user/bind', ['as' => 'userBind', 'uses' => 'ApiGuestController@userbind']);
  31. $router->get('/user/info/{id}', ['as' => 'userInfoById', 'uses' => 'ExampleController@user']);
  32. $router->get('/top/department/join/rate', ['as' => 'joinRate', 'uses' => 'ApiTopController@joinRate']);
  33. $router->get('/top/department/km/avg', ['as' => 'kmavg', 'uses' => 'ApiTopController@departmentKmAvg']);
  34. $router->get('/top/person/all', ['as' => 'personAll', 'uses' => 'ApiTopController@personKm']);
  35. $router->get('/top/person/department', ['as' => 'personDepartment', 'uses' => 'ApiTopController@personDepartmentKm']);
  36. $router->get('/mark', ['as' => 'mark', 'uses' => 'ApiTopController@mark']);
  37. $router->get('/lottery', ['as' => 'lottery', 'uses' => 'ApiController@lotteryResult']); // 获取本人抽奖的结果
  38. $router->get('/lottery/{id}', ['as' => 'lottery', 'uses' => 'ApiController@lottery']); // 抽奖接口
  39. $router->get('/pk/online/users', ['as' => 'pk_online_users', 'uses' => 'PkApiController@getOnlineUsers']); //获取在线用户列表
  40. $router->get('/pk/top', ['as' => 'pk_top', 'uses' => 'PkApiController@getTop']); //获取排行榜信息及当前用户信息
  41. $router->post('/pk/challenge', ['as' => 'pk_challenge', 'uses' => 'PkApiController@postChallenge']); //发起PK
  42. $router->post('/pk/response', ['as' => 'pk_response', 'uses' => 'PkApiController@postPkResponse']); //PK应答
  43. });
  44. //后台接口
  45. $router->group(['prefix' => 'console'], function () use ($router) {
  46. $router->get('/cache/question', ['as' => 'cache_question', 'uses' => 'Console\CacheController@question']); //生成题目缓存
  47. $router->get('/cache/config', ['as' => 'cache_config', 'uses' => 'Console\CacheController@config']); //生成配置缓存
  48. $router->get('/pk/process', ['as' => 'pk_process', 'uses' => 'Console\PkProcessController@getResultProcess']); //PK结果处理接口
  49. });
  50. /**
  51. * 项目链接
  52. */
  53. $router->group(['prefix' => 'p'], function () use ($router) {
  54. $router->get('/2018/kingdee', ['as' => '2018_kingdee', 'uses' => 'CaseController@e18Kingdee']); //金蝶项目链接
  55. $router->get('/2018/essence', ['as' => '2018_essence', 'uses' => 'CaseController@e18Essence']); //安信项目链接
  56. });
  57. $router->get('/test', ['as' => 'test', 'uses' => 'ExampleController@test']);
  58. $router->get('/base', ['as' => 'baseIndex', 'uses' => 'ExampleController@baseIndex']);
  59. /*$router->group(["prefix" => 'example'], function () use ($router) {
  60. $router->get('/cache', ['as' => 'index', 'uses' => 'ExampleController@cache']);
  61. $router->get('/test', ['as' => 'test', 'uses' => 'ExampleController@test']);
  62. $router->get('/sso', ['as' => 'test', 'uses' => 'ExampleController@sso']);
  63. $router->get('/login', ['as' => 'login', 'uses' => 'ExampleController@login']);
  64. $router->get('/pk', ['as' => 'pk', 'uses' => 'ExampleController@pk']);
  65. });*/