route.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use Modules\System\Http\Controllers\NoticesController;
  4. use Modules\System\Http\Controllers\NoticeTypesController;
  5. Route::prefix('system')->group(function () {
  6. // 通知管理
  7. Route::prefix('notices')->group(function(){
  8. // 通知分类
  9. Route::prefix('types')->group(function (){
  10. // 添加通知分类
  11. Route::post('add',[NoticeTypesController::class, 'add']);
  12. // 通知分类列表
  13. Route::any('list',[NoticeTypesController::class, 'list']);
  14. // 删除通知分类
  15. Route::post('del/{id}',[NoticeTypesController::class, 'delete']);
  16. });
  17. // 通知管理
  18. Route::prefix('notice')->group(function(){
  19. // 添加通知
  20. Route::post('add',[NoticesController::class, 'addNotice']);
  21. // 通知列表
  22. Route::any('list',[NoticesController::class, 'list']);
  23. // 删除通知
  24. Route::post('del/{id}',[NoticesController::class, 'delete']);
  25. // 修改通知状态
  26. Route::post('enable/{id}',[NoticesController::class, 'enable']);
  27. // 获取编辑信息
  28. Route::get('edit/{id}',[NoticesController::class, 'info']);
  29. // 保存编辑
  30. Route::post('edit/{id}',[NoticesController::class, 'edit']);
  31. // 不判断权限
  32. Route::prefix("")->group(function (){
  33. // 通知对象接口
  34. Route::any('obj_option',[NoticesController::class, 'objOption'])->withoutMiddleware(config('catch.route.middlewares'));
  35. // 我的通知
  36. Route::any('mine',[NoticesController::class, 'myNotices'])->withoutMiddleware(config('catch.route.middlewares'));
  37. // 已读
  38. Route::get('read/{id}',[NoticesController::class, 'setRead'])->withoutMiddleware(config('catch.route.middlewares'));
  39. // 用户删除
  40. Route::get('user_del/{id}',[NoticesController::class, 'userDel'])->withoutMiddleware(config('catch.route.middlewares'));
  41. // 查看通知信息
  42. Route::any('detail/{id}',[NoticesController::class, 'detail'])->withoutMiddleware(config('catch.route.middlewares'));
  43. // 获取首页弹窗消息
  44. Route::any('popup',[NoticesController::class, 'getPopup'])->withoutMiddleware(config('catch.route.middlewares'));
  45. });
  46. });
  47. });
  48. });