admin.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. use App\Http\Controllers\Admin\AdminController;
  3. use App\Http\Controllers\Admin\ClassinfyController;
  4. use App\Http\Controllers\Admin\ClassinfyRepairController;
  5. use App\Http\Controllers\Admin\UserController;
  6. use App\Http\Controllers\HomeSiteController;
  7. use Illuminate\Http\Request;
  8. use Illuminate\Support\Facades\Route;
  9. /*
  10. |--------------------------------------------------------------------------
  11. | API Routes
  12. |--------------------------------------------------------------------------
  13. |
  14. | Here is where you can register API routes for your application. These
  15. | routes are loaded by the RouteServiceProvider within a group which
  16. | is assigned the "api" middleware group. Enjoy building your API!
  17. |
  18. */
  19. ///** @var TYPE_NAME $api */
  20. //$api = app("Dingo\Api\Routing\Router");
  21. Route::group(['middleware'=>'check_token'],function ($api) {
  22. Route::get('userinfo', [AdminController::class,'userinfo']);
  23. Route::group(['prefix' => 'Login'], function($api) {
  24. //获取后台权限
  25. Route::get('GetRole', [AdminController::class,'GetRole']);
  26. });
  27. //用户相关信息
  28. Route::group(['prefix' => 'User'], function($api) {
  29. //获取后台权限
  30. Route::get('GetUserInfo', [UserController::class,'GetUserInfo']);
  31. Route::get('GetUserInfos', [UserController::class,'GetUserInfos']);
  32. Route::post('UpdateUserInfo', [UserController::class,'UpdateUserInfo']);
  33. Route::delete('DeleteUserInfo', [UserController::class,'DeleteUserInfo']);
  34. });
  35. //招工信息
  36. Route::group(['prefix'=>'Job'],function($qpi){
  37. //获取招工列表信息
  38. Route::get('');
  39. });
  40. //分类
  41. Route::group(['prefix'=>'Classify'],function($qpi){
  42. //获取招工列表信息
  43. Route::get('GetClassify',[ClassinfyController::class,'GetClassify']);
  44. Route::post('AddClassify',[ClassinfyController::class,'AddClassify']);
  45. Route::get('DisableClassify',[ClassinfyController::class,'DisableClassify']);
  46. });
  47. //分类
  48. Route::group(['prefix'=>'ClassifyRepair'],function($qpi){
  49. //获取招工列表信息
  50. Route::get('GetClassify',[ClassinfyRepairController::class,'GetClassify']);
  51. Route::post('AddClassify',[ClassinfyRepairController::class,'AddClassify']);
  52. Route::post('ClassifyUploadImg',[ClassinfyRepairController::class,'ClassifyUploadImg']);
  53. Route::post('UpdateClassify',[ClassinfyRepairController::class,'UpdateClassify']);
  54. Route::get('DisableClassify',[ClassinfyRepairController::class,'DisableClassify']);
  55. });
  56. });
  57. Route::group(['prefix' => 'Login'], function($api) {
  58. /*登录**/
  59. $api->post('Login', [AdminController::class,'AdminLogin']);
  60. $api->post('updateAdmin', [AdminController::class,'updateAdmin']);
  61. });