api.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register API routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | is assigned the "api" middleware group. Enjoy building your API!
  11. |
  12. */
  13. $routes = array(
  14. 'getCurrentGame' => exeApi('api', 'PrizeHandle', 'getNewprizeGamedata'),
  15. 'setCurrentGameStatus' => exeApi('api', 'PrizeHandle', 'updateCloses'),
  16. 'setCheckGame' => exeApi('api', 'PrizeHandle', 'UpdateCheckgame'),
  17. 'getjnd28Info' => exeApi('api', 'PrizeHandle', 'Getjnd28Info'),
  18. 'checkJnd28' => exeApi('api', 'PrizeHandle', 'checkJnd28'),
  19. 'delGamebetInfo' => exeApi('api', 'PrizeHandle', 'DelinfoBytime'),
  20. 'getOpeninfo' => exeApi('api', 'Basicinfo', 'getOnOrOff'),
  21. 'clearTable' => exeApi('api', 'Basicinfo', 'clearTable'), //清空指定表数据
  22. 'addRecharge' => exeApi('api', 'Recharges', 'AddRecharge'),
  23. 'odds' => exeApi('api', 'BetLog', 'odds'),
  24. 'rechargeMoney' => exeApi('admin', 'Regulation', 'AddOrCutMoney'),
  25. 'countHistory' => exeApi('api', 'History', 'index'),
  26. 'HistoryCount' => exeApi('api', 'History', 'count'),
  27. 'getBetLog' => exeApi('api', 'BetLog', 'getBetLog'),
  28. 'updateBnumber' => exeApi('admin', 'bnumber', 'update'),
  29. 'batchUpdateBnumber' => exeApi('admin', 'bnumber', 'batchUpdate'),
  30. 'autoOpenPrize' => exeApi('api', 'OpenPrize', 'open'),
  31. 'nagentCountwater' => exeApi('api', 'PrizeHandle', 'CountWater'), //级差代理业绩统计
  32. 'kygame' => exeApi('api', 'Kygame', 'getPipelineRecord'),
  33. 'oggame' => exeApi('api', 'Oggame', 'getPipelineRecord'),
  34. 'aggameDownloadFile' => exeApi('api', 'Aggame', 'downloadFile'),
  35. 'aggameReadFile' => exeApi('api', 'Aggame', 'readerFile'),
  36. 'a' => exeApi('api', 'Aggame', 'aftp'),
  37. 'lcqpgame' => exeApi('api', 'Lcqpgame', 'getPipelineRecord'),
  38. 'lygame' => exeApi('api', 'Lygame', 'getPipelineRecord'),
  39. 'hjgame' => exeApi('api', 'HjGame', 'getPipelineRecord'),
  40. 'ogsports' => exeApi('api', 'Oggame_sport', 'getPipelineRecord'),
  41. 'fygame' => exeApi('api', 'fyGame', 'getBetting'),
  42. 'settdebug' => exeApi('api', 'Settlement', 'debug'),
  43. 'autoSettadd' => exeApi('api', 'SettlementAuto', 'doAddNotie'),
  44. 'autoSettsett' => exeApi('api', 'SettlementAuto', 'doAutoSett'),
  45. 'setSports' => exeApi('api', 'WriteSports', 'setSports'),
  46. 'upMatch' => exeApi('api', 'WriteSports', 'upMatch'),
  47. 'mysetSportsnew_odds' => exeApi('api', 'WriteSportsnew', 'odds'),
  48. );
  49. function exeApi($m, $c, $act)
  50. {
  51. return array('m' => $m, 'c' => $c, 'act' => $act);
  52. }
  53. Route::any('/{name}', function ($name) use ($routes) {
  54. if (!isset($routes[$name])) {
  55. return responseToJson(-404, '404');
  56. }
  57. $target = $routes[$name];
  58. return appExec($target['m'], $target['c'], $target['act']);
  59. })->middleware('api');