admin.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2018-2020 rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: TABLE ME
  8. // +----------------------------------------------------------------------
  9. // | Date: 2020-08-30 14:41
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. Route::group('admin', function () {
  13. //获取本管理信息
  14. Route::rule('init', 'v1.admin/init');
  15. //获取所有管理者
  16. Route::post('list','v1.admin/list');
  17. //获取管理员具体信息
  18. Route::post('getInfo','v1.admin/getInfo');
  19. //管理退出
  20. Route::rule('logout', 'v1.admin/logout');
  21. //获取个人设置[[当前登录用户]]
  22. Route::post('info','v1.admin/info');
  23. //修改个人信息[当前登录用户]
  24. Route::post('edit','v1.admin/edit');
  25. //修改个人密码[当前登录用户]
  26. Route::post('password','v1.admin/password');
  27. //修改管理员信息
  28. Route::post('save','v1.admin/save');
  29. //删除管理员信息
  30. Route::post('del','v1.admin/del');
  31. })->middleware([
  32. \app\admin\middleware\AllowOriginMiddleware::class,
  33. \app\admin\middleware\AdminAuthTokenMiddleware::class
  34. ]);