api.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?php
  2. use App\Jobs\DealBetPool;
  3. use Illuminate\Http\Request;
  4. use Illuminate\Support\Facades\Route;
  5. /*
  6. |--------------------------------------------------------------------------
  7. | API Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here is where you can register API routes for your application. These
  11. | routes are loaded by the RouteServiceProvider within a group which
  12. | is assigned the "api" middleware group. Enjoy building your API!
  13. |
  14. */
  15. Route::group(['namespace' => 'Api'], function ($router) {
  16. // 获取验证码
  17. $router->post('sms', 'HomeController@getSms');
  18. // 注册接口
  19. $router->post('register', 'AuthController@reg');
  20. // 登录
  21. $router->post('login', 'AuthController@login');
  22. $router->post('test', 'TestController@index');
  23. $router->get('test', 'TestController@index');
  24. $router->get('pwd', function (){
  25. // var_dump(bcrypt('123456'));
  26. });
  27. // 忘记密码
  28. $router->post('forgetpass', 'AuthController@forgetpass')->name('forgetpass');
  29. // 用户协议
  30. $router->post('rule/protocol', 'ProtocolController@index');
  31. // 获取地区信息
  32. $router->get('area/{id}', 'AreaController@Index');
  33. $router->get('allarea/{id}', 'AreaController@allareas');
  34. // 支付回调接口
  35. $router->any('notify/return', 'PayController@aliReturn');
  36. // 支付异步通知接口
  37. $router->any('notify/alipay', 'PayController@aliNotify');
  38. //查询订单信息
  39. $router->any('pay/getpayinfo', 'PayController@getPcPayInfo');
  40. // 支付异步通知接口
  41. $router->any('notify/wechat', 'PayController@weichatNotify');
  42. // 不强制认证访问令牌接口
  43. $router->group(['middleware' => 'token.maybe'], function ($router) {
  44. });
  45. // 强制认证访问令牌接口
  46. $router->group(['middleware' => 'token.must'], function ($router) {
  47. // 个人中心-用户资料
  48. $router->get('user', 'UserController@show');
  49. // 完善信息
  50. $router->post('user/update', 'UserController@update');
  51. //获取二维码信息
  52. $router->get('user/qrcode', 'UserController@getPayQrcode');
  53. Route::middleware('mustLevelMiddleware')->group(function ($router) {
  54. // 用户协议
  55. $router->post('rule/{rule}', 'ConfigController@Show');
  56. /*****************************个人中心*******************************/
  57. // 个人中心-消息
  58. $router->post('user/msg', 'UserMsgController@message');
  59. // 个人中心-更新消息已读
  60. $router->post('usermsg/update', 'UserMsgController@updateStatus');
  61. // 银行卡列表
  62. $router->post('userBank/index', 'UserBankController@index');
  63. // 银行卡-添加/编辑
  64. $router->post('userBank/edit', 'UserBankController@edit');
  65. // 银行卡-解绑
  66. $router->post('userBank/unbundle', 'UserBankController@unbundle');
  67. // 用户信息
  68. $router->post('user/getUser', 'UserController@getUser');
  69. // 获取升级差额
  70. $router->post('upgrade/cost', 'UpgradeController@cost');
  71. // 交费升级
  72. $router->get('upgrade/upReq', 'UpgradeController@getList');
  73. $router->post('upgrade/add', 'UpgradeController@add');
  74. // 升级记录
  75. $router->post('upgrade/uplog', 'UpgradeController@getUpgradeLogs');
  76. //变更升级等级信息
  77. $router->post('upgrade/changelv', 'UpgradeController@changeLevel');
  78. // 升级列表
  79. $router->post('upgrade', 'UpgradeController@index');
  80. //调用用户升级到下一级信息
  81. $router->post('upgrade/nextLevel', 'UpgradeController@getNextLevelInfo');
  82. //支付升级后
  83. $router->post('upgrade/check', 'UpgradeController@upCheck');
  84. // 业务达到要求升级
  85. $router->post('upgrade/addbycondition', 'UpgradeController@addByCondition');
  86. // 点币记录
  87. $router->post('account/coin', 'AccountLogController@coin');
  88. // 点币转账
  89. $router->post('coin/transfer', 'AccountLogController@coinTransfer');
  90. $router->post('coin/transfer', 'AccountLogController@coinTransfer');
  91. // 点币汇率
  92. $router->post('coin/getCoin', 'UserCoinController@getCoin');
  93. // 点币购买
  94. $router->post('coin/buy', 'UserCoinController@buy');
  95. // 提现申请
  96. $router->post('user/withdraw', 'UserWithdrawController@add');
  97. // 提现记录
  98. $router->post('user/withdrawlog', 'UserWithdrawController@outCashLog');
  99. // 投诉反馈
  100. $router->post('feedback', 'FeedBackController@add');
  101. // 修改支付密码
  102. $router->post('user/modifyPayPass', 'UserController@modifyPayPass');
  103. // 修改账号密码
  104. $router->post('user/modifyPass', 'UserController@modifyPassword');
  105. /*****************************首页*******************************/
  106. // 首页-代理明细
  107. $router->post('invitor', 'UserController@invitor');
  108. // 首页-广告明细
  109. $router->post('adver', 'AdverController@adver');
  110. // 首页-代理广告(下级提交的对赌广告,需要上级审核)
  111. $router->post('index/adver', 'AdverController@index');
  112. // 首页-代理广告(提交对赌协议数据)
  113. $router->post('adver/betguarantee', 'AdverController@userGuarantee');
  114. // 首页-代理广告(提交业务数据)
  115. $router->post('adver/betachievement', 'AdverController@userAchievement');
  116. // 首页-上级审核对赌广告
  117. $router->post('index/adver/audit', 'AdverController@auditBet');
  118. // 首页-收益记录
  119. $router->post('index/statistics', 'HomeController@statistics');
  120. // 轮播图
  121. $router->post('index/slider', 'HomeController@slider');
  122. // 首页-任务进度轴
  123. $router->post('index/progress', 'HomeController@progress');
  124. // 首页-广告发布记录
  125. $router->post('index/publish', 'AdverController@publish');
  126. // 首页-广告发布记录-广告详情
  127. $router->post('adver/show', 'AdverController@show');
  128. // 首页-广告发布记录-详情
  129. $router->post('adver/modify', 'AdverController@modify');
  130. // 首页-奖金记录
  131. $router->post('index/account', 'AccountLogController@index');
  132. // 地区代理申请
  133. $router->post('index/proxyarea', 'ProxyAreaController@add');
  134. // 首页-统计信息
  135. $router->post('index/sum', 'AccountLogController@sum');
  136. // 首页-申请代理-获取代理费用
  137. $router->post('index/proxy/applymoney', 'ProxyController@getApplyMoney');
  138. /*****************************投放广告*******************************/
  139. // 投放广告
  140. $router->post('adver/add', 'AdverController@add');
  141. //pc投放广告
  142. $router->post('adver/pcadd', 'AdverController@pcadd');
  143. // 代理地区信息(最低额度)
  144. $router->post('proxy/get', 'ProxyController@show');
  145. // 行业列表
  146. $router->post('industry', 'IndustryController@index');
  147. // 担保协议设置信息
  148. $router->post('guarantee', 'ConfigController@guarantee');
  149. // 首页-广告详情
  150. });
  151. });
  152. /*****************************桃牛对接接口****************************************/
  153. $router->group(['middleware' => 'taoniu.auth'], function ($router) {
  154. // 桃牛获取广告
  155. $router->post('taoniu/adver', 'TaoniuController@adver');
  156. // 广告计费
  157. $router->post('taoniu/deduction', 'TaoniuController@adverDeduction');
  158. // 分享扣费
  159. $router->post('taoniu/share', 'TaoniuController@shareBilling');
  160. });
  161. Route::post('uploadImg', 'PublicController@uploadImg');
  162. });