api.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. App::setLocale(env('DEFAULT_LOCALE','en'));
  4. Route::any('/apk/ios', 'Api\AutoApkController@iosJump');
  5. Route::any('/h5', 'Api\AutoApkController@h5jump');
  6. Route::any('/apk/health', 'Api\AutoApkController@health');
  7. Route::any('/apk/inside', 'Api\AutoApkController@inside');
  8. Route::any('/apk/make', 'Api\AutoApkController@createApk');
  9. Route::any('/apk/getsign', 'Api\AutoApkController@findUrlSign');
  10. Route::any('/app/{package}', 'Api\ApkController@download');
  11. Route::any('/appconfig', 'Api\ApkController@appconfig');
  12. Route::any('/apk/log', 'Api\ApkController@log');
  13. Route::any('/apk/checkpay', 'Api\ApkController@check_user_pay');
  14. Route::any('/apk/act', 'Api\ApkController@check_action');
  15. //Route::any('/apk/save', 'Api\ApkController@save_data');
  16. //Route::any('/apk/load', 'Api\ApkController@load_data');
  17. Route::any('/apk/savenew', 'Api\ApkController@save_data_new');
  18. Route::any('/apk/loadnew', 'Api\ApkController@load_data_new');
  19. Route::any('/apk/test', 'Api\ApkController@test');
  20. Route::any('/apk/checkpay2', 'Api\ApkController@check_user_pay2');
  21. Route::post('/user/message', 'Api\ApiController@userMessageAdd');
  22. Route::any('/log', 'Api\ApiController@log');
  23. Route::any('/callback_start', 'Api\AccCallbackController@send');
  24. Route::any('/error_report', 'Api\ApiController@errorReport');
  25. Route::any('/adjust_test', 'Api\ApiController@adjust');
  26. Route::any('/repay_orders', 'Api\ApiController@repayOrders');
  27. Route::any('/telehook', 'Api\TelegramController@hook');
  28. Route::any('/teletest', 'Api\TelegramController@test');
  29. Route::any('/rate_us', 'Api\ApiController@rateUs');
  30. Route::any('/apk/cconfig', 'Api\AutoApkController@channelConfig');
  31. Route::any('/apk/jump', 'Api\AutoApkController@jumpApkByConfig');
  32. Route::group([
  33. 'middleware' => 'newApiSign'
  34. ], function ($route) {
  35. // 支付入口 -- 总入口
  36. $route->any('/payment_entry/pay', 'Api\PaymentEntryController@pay');
  37. $route->any('/payment_entry/iospay', 'Api\PaymentEntryController@iospay');
  38. $route->any('/payment_entry/googlepay', 'Api\PaymentEntryController@googlepay');
  39. });
  40. // 根据支付档位获取渠道
  41. //Route::get('/test_tele', 'Api\TestController@tele');
  42. //Route::get('/test', 'Api\TestController@index');
  43. Route::any('/game_api/update_user_info', 'Api\GameApiController@updateUserInfo');
  44. Route::any('/game_api/user_source', 'Api\GameApiController@UserSource');
  45. //在线数据
  46. Route::any('/game_api/billboard', 'Api\GameApiController@billBoard');
  47. Route::any('/game_api/billboard2', 'Api\GameApiController@billBoard2');
  48. //在线数据
  49. Route::any('/game_api/online_list', 'Api\GameApiController@onlineList');
  50. // 文件上传
  51. Route::any('/upload/upload_file', 'Api\UploadController@uploadFile');
  52. // AB面,单独开关
  53. //Route::any('/other/switch', 'Api\OtherController@switch');
  54. //Route::any('/appflyer/event', 'Api\AppflyerEventController@index');
  55. //Route::any('/appflyer/test', 'Api\AppflyerEventController@test');
  56. // 加载注册页面
  57. //Route::get('/rev/register_view', 'Api\RegisterController@registerView');
  58. // 下载页面
  59. //Route::get('/rev/download', 'Api\RegisterController@download');
  60. // 注册提交页面
  61. //Route::any('/rev/index', 'Api\RegisterController@index');
  62. //Route::any('/rev/customer_service', 'Api\RegisterController@customerService');
  63. Route::any('/send_code/send_verify', 'Api\SendCodeController@send_verify');
  64. //Route::any('/send_code/send', 'Api\SendCodeController@send');
  65. Route::any('/send_code/get_code', 'Api\SendCodeController@getCode');
  66. Route::any('/send_code/kmi_send', 'Api\SendCodeController@kmiSend');
  67. // 渠道管理-- 根据包开放不同的游戏和充值
  68. Route::any('/channel/channel_open_recharge', 'Api\ChannelController@ChannelOpenRecharge');
  69. Route::any('/channel/channel_game_open', 'Api\ChannelController@ChannelGameOpen');
  70. Route::any('/channel/channel_second_stage', 'Api\ChannelController@ChannelSecondStage');
  71. Route::any('/channel/shareUrl', 'Api\ChannelController@shareUrl'); // 分渠道展示不同分享链接
  72. // 大厅活动公告
  73. Route::any('/notice/hall_announcement', 'Api\NoticeController@hallAnnouncement');
  74. Route::any('/notice/hall_announcement_info/{id}', 'Api\NoticeController@hallAnnouncementInfo');
  75. Route::any('/notice/remind', 'Api\NoticeController@remind');
  76. // 谷歌支付
  77. Route::any('/google_pay/confirm', 'Api\GooglePayController@confirm');
  78. Route::any('/apple_store_pay/confirm', 'Api\AppleStorePayController@confirm');
  79. // 裂变 -- 分享
  80. //Route::any('/extension/getScore', 'Api\ExtensionsController@getScore');
  81. //Route::any('/extension/receiveScore', 'Api\ExtensionsController@receiveScore');
  82. //Route::any('/extension/list', 'Api\ExtensionsController@list');
  83. //Route::any('/extension/recharge_rate', 'Api\ExtensionsController@rechargeRate');
  84. // 裂变 -- 分享新接口
  85. Route::any('/new_extension/getScore', 'Api\ExtensionsController@getScore');
  86. Route::any('/new_extension/receiveScore', 'Api\ExtensionsController@receiveScore');
  87. Route::any('/new_extension/list', 'Api\ExtensionsController@list');
  88. // 获取版本信息
  89. Route::get('/get_version/index', 'Api\GetVersionController@index');
  90. Route::get('/game_version/ruby', 'Api\GetVersionController@indexRuby');
  91. Route::get('/del_version', 'Api\GetVersionController@delVersion');
  92. // 支付绑定信息修改
  93. Route::any('/api/update_accounts_pay_info', 'Api\ApiController@updateAccountsPayInfo');
  94. // 支付绑定信息获取
  95. Route::any('/api/get_accounts_pay_info', 'Api\ApiController@getAccountsPayInfo');
  96. //提现手续费返回
  97. Route::any('/api/withDrawTax', 'Api\ApiController@withDrawTax');
  98. //新手引导
  99. //Route::any('/api/new_guide', 'Api\ApiController@newGuide');
  100. // 版本
  101. //Route::any('/query_version_new', 'Api\QueryVersionNewController@index');
  102. Route::get('/gear/get_channels', 'Api\RechargeController@getPayChannel');
  103. Route::any('/config/index', 'Api\ConfigController@index');
  104. // 客服功能管理
  105. Route::any('/api/customer_service', 'Api\ApiController@customer_service');
  106. Route::any('/pgsoft/leave', 'Game\PgSimController@leaveOrg');
  107. Route::any('/jiligames/leave', 'Game\JiliSimController@leaveOrg');
  108. Route::any('/jiligames/lunchorg2', 'Game\JiliSimController@gameLunchOrg');
  109. Route::any('/igt/leave', 'Game\IgtSimController@leaveOrg');
  110. Route::any('/igt/lunchorg', 'Game\IgtSimController@gameLunchOrg');
  111. Route::any('/igt/lunch', 'Game\IgtSimController@gameLunch');
  112. Route::any('/pp/leave', 'Game\PPSimController@leaveOrg');
  113. Route::any('/pp/lunchorg', 'Game\PPSimController@gameLunchOrg');
  114. Route::any('/pp/lunch', 'Game\PPSimController@gameLunch');
  115. Route::group([
  116. 'middleware' => 'apiSign'
  117. ], function (\Illuminate\Routing\Router $route) {
  118. $route->any('/web_login', 'Api\ApkController@WebLogin');
  119. $route->any('/launch9x', 'Game\JiliSimController@launch9x');
  120. Route::any('/jiligames/lunchorg', 'Game\JiliSimController@gameLunchOrg');
  121. $route->any('/bind_country', 'Api\ApiController@bindCountry'); // 返回首充金额
  122. $route->any('/check_country', 'Api\ApiController@checkCountry'); // 返回首充金额
  123. $route->any('/bind_locale', 'Api\ApiController@bindLocale'); // 返回首充金额
  124. $route->any('/check_locale', 'Api\ApiController@checkLocale'); // 返回首充金额
  125. $route->any('/pay/first_pay_multi', 'Api\PayRechargeController@firstPayMulti'); // 返回首充金额
  126. $route->any('/pay/get_second', 'Api\PayRechargeController@getSecondGive'); // 返回首充金额
  127. $route->any('/pay/time_bonus', 'Api\PayRechargeController@timeBonus'); // 返回首充金额
  128. $route->any('/pgsoft/lunchorg', 'Game\PgSimController@gameLunchOrg');
  129. $route->any('/jackpot', 'Api\ApiController@jackpot');
  130. $route->any('/changeapk/check', 'Api\ApkController@checkDownloadNotice');
  131. $route->any('/changeapk/click', 'Api\ApkController@clickDownloadNotice');
  132. $route->any('/send_code/send2', 'Api\SendCodeController@send2');
  133. $route->post('/commission', 'Api\ApiController@setCommission');//点位设置
  134. $route->get('/user/message', 'Api\ApiController@userMessageList');
  135. $route->get('/user/wait_read', 'Api\ApiController@wait_read');
  136. $route->get('/login_ip_map', 'Api\ApiController@LoginIPMap');
  137. $route->get('/login_ip', 'Api\ApiController@LoginIP');
  138. $route->get('/sign_in/{ip_check_key}', 'Api\ApiController@LoginIP_Hand');
  139. $route->get('/findready/{ip_check_key}', 'Api\ApiController@LoginIP_Mask');
  140. // ID白名单
  141. $route->any('/channel/channel_shield_id_white', 'Api\ApiController@channel_shield_id_white');
  142. // 公告
  143. $route->any('/notice/system_maintenance', 'Api\NoticeController@systemMaintenance');
  144. /*支付相关接口*/
  145. // 充值记录
  146. $route->get('/pay/orderList', 'Api\PayRechargeController@orderList');
  147. // 支付相关
  148. // 支付入口 -- 总入口
  149. $route->any('/payment/pay', 'Api\PaymentController@pay');
  150. /*返回所有可用支付渠道类型*/
  151. $route->get('/payapi/pay_type', 'Api\PayController@pay_type');
  152. /*返回充值档位*/
  153. // 返回充值金额
  154. $route->get('/recharge/gear', 'Api\RechargeController@gear');
  155. $route->get('/recharge/gearAct', 'Api\RechargeController@gearAct');
  156. $route->get('/recharge/pay_channel', 'Api\RechargeController@payChannel');
  157. $route->get('/recharge/firstPayConfig', 'Api\RechargeController@firstPayConfig');
  158. $route->get('/channel/list', 'Api\ChannelController@index');
  159. });
  160. Route::get('/gear/get_channel', 'Api\RechargeController@getPayChannel');
  161. Route::get('/recharge/vipConfig', 'Api\RechargeController@vipConfig');//vip配置信息
  162. Route::get('/recharge/userTotalRecharge', 'Api\RechargeController@userTotalRecharge');//用户总充值
  163. Route::get('/recharge/guidePayment', 'Api\RechargeController@guidePayment');//引导付费
  164. //Route::get('/pay/orderList', 'Api\PayRechargeController@orderList')->middleware('throttle:60,1'); // 充值记录
  165. Route::get('/pay/first_pay', 'Api\PayRechargeController@firstPay'); // 返回首充金额
  166. Route::post('/withDraw/withDrawInfo', 'Api\WithDrawInfoController@withDrawInfo');//提现信息完善
  167. Route::post('/withDraw/withDrawInfoSA', 'Api\WithDrawInfoController@withDrawInfoSA');//提现信息完善
  168. Route::get('/withDraw/getWithDrawInfo', 'Api\WithDrawInfoController@getWithDrawInfo');//获取提现信息
  169. //
  170. // 支付-提现 相关
  171. //
  172. //Route::any('/Pagsmilepay/notify', 'Api\PagsmilePayController@notify');
  173. //Route::any('/Pagsmilepay/sync_notify', 'Api\PagsmilePayController@sync_notify');
  174. //Route::any('/Pagsmilepay/cash_notify', 'Api\PagsmilePayController@cash_notify');
  175. //
  176. //Route::any('/Pagsmilepay/notify_new', 'Api\PagsmileNewPayController@notify');
  177. //
  178. //// YY Pay
  179. //Route::any('/foxpay/notify', 'Api\FoxPayController@notify');
  180. //Route::any('/foxpay/sync_notify', 'Api\FoxPayController@sync_notify');
  181. //Route::any('/foxpay/cash_notify', 'Api\FoxPayController@cash_notify');
  182. //
  183. //
  184. //Route::any('/uupay/notify', 'Api\UuPayController@notify');
  185. //Route::any('/uupay/sync_notify', 'Api\UuPayController@sync_notify');
  186. //Route::any('/uupay/cash_notify', 'Api\UuPayController@cash_notify');
  187. //
  188. //
  189. Route::any('/goopago/notify', 'Api\GoopagoController@notify');
  190. Route::any('/goopago/sync_notify', 'Api\GoopagoController@sync_notify');
  191. Route::any('/goopago/cash_notify', 'Api\GoopagoController@cash_notify');
  192. //
  193. //
  194. //Route::any('/oteapaynew/notify', 'Api\OTeaPayNewController@notify');
  195. //Route::any('/oteapaynew/sync_notify', 'Api\OTeaPayNewController@sync_notify');
  196. //Route::any('/oteapaynew/cash_notify', 'Api\OTeaPayNewController@cash_notify');
  197. //
  198. //Route::any('/bpay/notify', 'Api\OTeaPayController@notify');
  199. //Route::any('/bpay/sync_notify', 'Api\OTeaPayController@sync_notify');
  200. //Route::any('/bpay/cash_notify', 'Api\OTeaPayController@cash_notify');
  201. Route::any('/lqpay/notify', 'Api\LQPayController@notify');
  202. Route::any('/lqpay/cash_notify', 'Api\LQPayController@cash_notify');
  203. Route::any('/ppay/notify', 'Api\PPayController@notify');
  204. Route::any('/ppay/cash_notify', 'Api\PPayController@cash_notify');
  205. Route::any('/cashpay/notify', 'Api\FastPayController@notify');
  206. Route::any('/cashpay/sync_notify', 'Api\FastPayController@sync_notify');
  207. Route::any('/cashpay/cash_notify', 'Api\FastPayController@cash_notify');
  208. Route::any('/cashpay/agent_cash_notify', 'Api\FastPayController@cash_notify');
  209. Route::any('/n_cashpay/notify', 'Api\CashPayController@notify');
  210. Route::any('/n_cashpay/sync_notify', 'Api\CashPayController@sync_notify');
  211. Route::any('/n_cashpay/cash_notify', 'Api\CashPayController@cash_notify');
  212. Route::any('/n_cashpay/agent_cash_notify', 'Api\CashPayController@cash_notify');
  213. Route::any('/fastpay/notify', 'Api\FastPayController@notify');
  214. Route::any('/fastpay/sync_notify', 'Api\FastPayController@sync_notify');
  215. Route::any('/fastpay/cash_notify', 'Api\FastPayController@cash_notify');
  216. Route::any('/fastpay/agent_cash_notify', 'Api\FastPayController@cash_notify');
  217. Route::any('/nicepay/notify', 'Api\NicePayController@notify');
  218. Route::any('/nicepay/sync_notify', 'Api\NicePayController@sync_notify');
  219. Route::any('/nicepay/cash_notify', 'Api\NicePayController@cash_notify');
  220. Route::any('/nicepay/agent_cash_notify', 'Api\NicePayController@cash_notify');
  221. Route::any('/aegpay/notify', 'Api\AegPayController@notify');
  222. Route::any('/aegpay/payout_notify', 'Api\AegPayController@cash_notify');
  223. Route::any('/toppay/notify', 'Api\TopPayController@notify');
  224. Route::any('/toppay/payout_notify', 'Api\TopPayController@cash_notify');
  225. Route::any('/clickpay/notify', 'Api\ClickPayController@notify');
  226. Route::any('/clickpay/payout_notify', 'Api\ClickPayController@cash_notify');
  227. Route::any('/sitobank/notify', 'Api\SitoBankController@notify');
  228. Route::any('/sitobank/payout_notify', 'Api\SitoBankController@cash_notify');
  229. // WiwiPay支付渠道
  230. Route::any('/wiwipay/notify', 'Api\WiwiPayController@notify');
  231. Route::any('/wiwipay/payout_notify', 'Api\WiwiPayController@cash_notify');
  232. Route::any('/wiwipay/return', 'Api\WiwiPayController@sync_notify');
  233. // WDPay支付渠道
  234. Route::any('/wdpay/notify', 'Api\WDPayController@notify');
  235. Route::any('/wdpay/payout_notify', 'Api\WDPayController@cash_notify');
  236. Route::any('/wdpay/return', 'Api\WDPayController@sync_notify');
  237. // AiPay支付渠道
  238. Route::any('/aipay/notify', 'Api\AiPayController@notify');
  239. Route::any('/aipay/payout_notify', 'Api\AiPayController@cash_notify');
  240. Route::any('/aipay/return', 'Api\AiPayController@sync_notify');
  241. // CoinPay数字货币
  242. Route::any('/coinpay/notify', 'Api\CoinPayController@notify');
  243. Route::any('/coinpay/payout_notify', 'Api\CoinPayController@cash_notify');
  244. Route::any('/coinpay/return', 'Api\CoinPayController@sync_notify');
  245. Route::any('/russia/notify', 'Api\RussiaPayController@notify');
  246. Route::any('/russia/cash_notify', 'Api\RussiaPayController@cash_notify');
  247. Route::any('/stanpay/notify', 'Api\StanPayController@notify');
  248. Route::any('/stanpay/cash_notify', 'Api\StanPayController@cash_notify');
  249. Route::any('/smartfast/notify', 'Api\SmartFastPayController@notify');
  250. Route::any('/smartfast/payout_notify', 'Api\SmartFastPayController@cash_notify');
  251. //Route::any('/smartfastperu/notify', 'Api\SmartFastPeruController@notify');
  252. //Route::any('/smartfastperu/payout_notify', 'Api\SmartFastPeruController@cash_notify');
  253. Route::any('/smartfast_uni/notify/{country}', 'Api\SmartFastPeruController@notify');
  254. Route::any('/smartfast_uni/payout_notify/{country}', 'Api\SmartFastPeruController@cash_notify');
  255. Route::any('/smart/notify', 'Api\SmartPayController@notify');
  256. Route::any('/smart/payout_notify', 'Api\SmartPayController@cash_notify');
  257. Route::any('/sfp/proxy', 'Api\SmartFastColController@proxy');
  258. Route::any('/smartfastcol/notify', 'Api\SmartFastColController@notify');
  259. Route::any('/smartfastcol/payout_notify', 'Api\SmartFastColController@cash_notify');
  260. Route::any('/crypto/notify', 'Api\CryptoController@notify');
  261. Route::any('/crypto/payout_notify', 'Api\CryptoController@cash_notify');
  262. Route::any('/hhpay/notify', 'Api\HHPayColController@notify');
  263. Route::any('/hhpay/payout_notify', 'Api\HHPayColController@cash_notify');
  264. Route::any('/wwpay/notify', 'Api\WWPayColController@notify');
  265. Route::any('/wwpay/payout_notify', 'Api\WWPayColController@cash_notify');
  266. Route::any('/dopay/notify', 'Api\DoPayController@notify');
  267. Route::any('/dopay/payout_notify', 'Api\DoPayController@cash_notify');
  268. Route::any('/starpago/notify', 'Api\StarpagoController@notify');
  269. Route::any('/starpago/payout_notify', 'Api\StarpagoController@cash_notify');
  270. Route::any('/starpagobd/notify', 'Api\StarpagoBDController@notify');
  271. Route::any('/starpagobd/payout_notify', 'Api\StarpagoBDController@cash_notify');
  272. Route::any('/pkpay/notify', 'Api\PKpayController@notify');
  273. Route::any('/pkpay/payout_notify', 'Api\PKpayController@cash_notify');
  274. Route::any('/all2pay/notify', 'Api\ALL2payController@notify');
  275. Route::any('/all2pay/sync_notify', 'Api\ALL2payController@sync_notify');
  276. Route::any('/all2pay/cash_notify', 'Api\ALL2payController@cash_notify');
  277. Route::any('/karopay/notify', 'Api\KaroPayController@notify');
  278. Route::any('/karopay/sync_notify', 'Api\KaroPayController@sync_notify');
  279. Route::any('/karopay/cash_notify', 'Api\KaroPayController@cash_notify');
  280. //
  281. //Route::any('/bet_cat_pay/notify', 'Api\BetCatPayController@notify');
  282. //Route::any('/bet_cat_pay/sync_notify', 'Api\BetCatPayController@sync_notify');
  283. //Route::any('/bet_cat_pay/cash_notify', 'Api\BetCatPayController@cash_notify');
  284. //Route::any('/bet_cat_pay/agent_cash_notify', 'Api\BetCatPayController@agent_cash_notify');
  285. Route::any('/clear_cache', function () {
  286. $path = app()->basePath('/public/cache/');
  287. $dir = opendir($path);
  288. if (!$dir) {
  289. return apiReturnFail('open dir failed');
  290. }
  291. do {
  292. $file = readdir($dir);
  293. if (!$file) {
  294. break;
  295. }
  296. if ($file == '.' || $file == '..') {
  297. continue;
  298. }
  299. unlink($path.$file);
  300. } while ($file);
  301. return apiReturnSuc();
  302. });
  303. Route::any('/opcache/clear', 'Api\OpcacheController@index');
  304. Route::any('/adjust/report', 'Api\AdjustController@report');
  305. // Apcopay支付路由
  306. Route::prefix('apcopay')->group(function () {
  307. // 支付相关
  308. Route::post('pay_order', 'Api\ApcopayController@pay_order');
  309. // 支付回调
  310. Route::post('notify', 'Api\ApcopayController@notify');
  311. Route::post('callback', 'Api\ApcopayController@notify');
  312. // 同步通知
  313. Route::get('sync_notify', 'Api\ApcopayController@sync_notify');
  314. // 重定向路由 - 新增
  315. Route::get('redirect', 'Api\ApcopayController@sync_notify');
  316. // 提现回调
  317. Route::post('cash_notify', 'Api\ApcopayController@cash_notify');
  318. // 提现回调 - 新增
  319. Route::post('cash_callback', 'Api\ApcopayController@cash_callback');
  320. // 测试接口
  321. Route::get('test/payment', 'Api\ApcopayController@test_payment');
  322. Route::get('test/notify', 'Api\ApcopayController@test_notify');
  323. // 测试提现接口 - 新增
  324. Route::get('test/cashier', 'Api\ApcopayController@test_cashier');
  325. // 测试交易验证接口 - 新增
  326. Route::get('test/verify', 'Api\ApcopayController@test_verify_transaction');
  327. });
  328. /*
  329. |--------------------------------------------------------------------------
  330. | Agent Routes
  331. |--------------------------------------------------------------------------
  332. */
  333. Route::prefix('agent')->group(function () {
  334. Route::get('/info', 'Api\AgentController@getInfo');
  335. Route::get('/referrals', 'Api\AgentController@getReferrals');
  336. Route::get('/commissions', 'Api\AgentController@getCommissions');
  337. Route::get('/materials', 'Api\AgentController@getMaterials');
  338. Route::get('/tasks', 'Api\AgentController@getTasks');
  339. Route::post('/claim-reward', 'Api\AgentController@claimTaskReward');
  340. // 添加提现相关路由
  341. Route::get('/withdrawal-balance', 'Api\AgentController@getWithdrawalBalance');
  342. Route::get('/withdrawal-history', 'Api\AgentController@getWithdrawalHistory');
  343. Route::post('/request-withdrawal', 'Api\AgentController@requestWithdrawal');
  344. Route::post('/cancel-withdrawal', 'Api\AgentController@cancelWithdrawal');
  345. });
  346. // Public route for resetting daily commission (should be called via cron)
  347. Route::get('/agent/reset-daily-commission', 'Api\AgentController@resetDailyCommission');
  348. /*
  349. |--------------------------------------------------------------------------
  350. | Agent Click Tracking Routes
  351. |--------------------------------------------------------------------------
  352. */
  353. // 记录点击 - 公开访问(无需认证)
  354. Route::get('/click', 'Api\AgentClickController@recordClick');
  355. Route::get('/click2', 'Api\AgentClickController@recordClickPage');
  356. // 获取点击统计 - 需要认证
  357. Route::get('/agent/click-stats', 'Api\AgentClickController@getClickStats');
  358. // 公开获取成功提现记录展示
  359. //Route::get('/agent/recent-withdrawals', 'Api\AgentController@getRecentWithdrawals');