form.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 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. use app\common\middleware\AdminAuthMiddleware;
  13. use app\common\middleware\AdminTokenMiddleware;
  14. use app\common\middleware\AllowOriginMiddleware;
  15. use app\common\middleware\LogMiddleware;
  16. Route::group(function () {
  17. Route::group('system/form',function () {
  18. Route::post('create', '/create')->name('systemFormCreate')->option([
  19. '_alias' => '添加',
  20. '_auth' => true,
  21. ]);
  22. Route::post('update/:id', '/update')->name('systemFormUpdate')->option([
  23. '_alias' => '编辑',
  24. '_auth' => true,
  25. ]);
  26. Route::post('status/:id', '/statusSwitch')->name('systemFormStatusSwitch')->option([
  27. '_alias' => '编辑状态',
  28. '_auth' => true,
  29. ]);
  30. Route::delete('delete/:id', '/delete')->name('systemFormDelete')->option([
  31. '_alias' => '删除',
  32. '_auth' => true,
  33. ]);
  34. Route::get('detail/:id', '/detail')->name('systemFormDetail')->option([
  35. '_alias' => '详情',
  36. '_auth' => true,
  37. ]);
  38. Route::get('lst', '/lst')->name('systemFormLst')->option([
  39. '_alias' => '列表',
  40. '_auth' => true,
  41. ]);
  42. Route::get('excel', '/excel')->name('systemFormExcel')->option([
  43. '_alias' => '导出',
  44. '_auth' => true,
  45. ]);
  46. Route::get('user_lst/:id', '/formUserList')->name('systemFormUserLst')->option([
  47. '_alias' => '表单提交记录',
  48. '_auth' => true,
  49. ]);
  50. Route::get('select', '/select');
  51. Route::get('info/:id', '/info');
  52. })->prefix('admin.system.form.Form')->option([
  53. '_path' => '/systemForm/form_list',
  54. '_auth' => true,
  55. ]);
  56. })->middleware(AllowOriginMiddleware::class)
  57. ->middleware(AdminTokenMiddleware::class, true)
  58. ->middleware(AdminAuthMiddleware::class)
  59. ->middleware(LogMiddleware::class);