finance.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. /**
  13. * 财务模块 相关路由
  14. */
  15. Route::group('finance', function () {
  16. /** 提现 */
  17. Route::group(function () {
  18. //申请列表
  19. Route::get('extract', 'v1.finance.UserExtract/index')->option(['real_name' => '提现申请列表']);
  20. //编辑表单
  21. Route::get('extract/:id/edit', 'v1.finance.UserExtract/edit')->option(['real_name' => '提现记录修改表单']);
  22. //保存修改
  23. Route::put('extract/:id', 'v1.finance.UserExtract/update')->option(['real_name' => '提现记录修改']);
  24. //拒绝申请
  25. Route::put('extract/refuse/:id', 'v1.finance.UserExtract/refuse')->option(['real_name' => '拒绝提现申请']);
  26. //通过申请
  27. Route::put('extract/adopt/:id', 'v1.finance.UserExtract/adopt')->option(['real_name' => '通过提现申请']);
  28. })->option(['parent' => 'finance', 'cate_name' => '提现']);
  29. /** 资金记录 */
  30. Route::group(function () {
  31. //筛选类型
  32. Route::get('finance/bill_type', 'v1.finance.Finance/bill_type')->option(['real_name' => '资金记录类型']);
  33. //资金记录
  34. Route::get('finance/list', 'v1.finance.Finance/list')->option(['real_name' => '资金记录列表']);
  35. //佣金记录
  36. Route::get('finance/commission_list', 'v1.finance.Finance/get_commission_list')->option(['real_name' => '佣金记录列表']);
  37. //佣金详情用户信息
  38. Route::get('finance/user_info/:id', 'v1.finance.Finance/user_info')->option(['real_name' => '佣金详情用户信息']);
  39. //佣金提现记录个人列表
  40. Route::get('finance/extract_list/:id', 'v1.finance.Finance/get_extract_list')->option(['real_name' => '佣金提现记录个人列表']);
  41. /** 余额记录 */
  42. Route::get('balance/list', 'v1.finance.UserBalance/balanceList')->option(['real_name' => '余额记录列表']);
  43. Route::post('balance/set_mark/:id', 'v1.finance.UserBalance/balanceRecordRemark')->option(['real_name' => '余额记录备注']);
  44. })->option(['parent' => 'finance', 'cate_name' => '资金记录']);
  45. /** 充值 */
  46. Route::group(function () {
  47. //充值记录列表
  48. Route::get('recharge', 'v1.finance.UserRecharge/index')->option(['real_name' => '充值记录列表']);
  49. //删除记录
  50. Route::delete('recharge/:id', 'v1.finance.UserRecharge/delete')->option(['real_name' => '删除充值记录']);
  51. //获取用户充值数据
  52. Route::get('recharge/user_recharge', 'v1.finance.UserRecharge/user_recharge')->option(['real_name' => '获取用户充值数据']);
  53. //退款表单
  54. Route::get('recharge/:id/refund_edit', 'v1.finance.UserRecharge/refund_edit')->option(['real_name' => '充值退款表单']);
  55. //退款
  56. Route::put('recharge/:id', 'v1.finance.UserRecharge/refund_update')->option(['real_name' => '充值退款']);
  57. })->option(['parent' => 'finance', 'cate_name' => '充值']);
  58. })->middleware([
  59. \app\http\middleware\AllowOriginMiddleware::class,
  60. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  61. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  62. \app\adminapi\middleware\AdminLogMiddleware::class
  63. ])->option(['mark' => 'finance', 'mark_name' => '财务管理']);