demo.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkAdmin
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://demo.thinkadmin.top
  8. // +----------------------------------------------------------------------
  9. // | 开源协议 ( https://mit-license.org )
  10. // +----------------------------------------------------------------------
  11. // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
  12. // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
  13. // +----------------------------------------------------------------------
  14. use think\facade\Request;
  15. use think\facade\Route;
  16. /* 演示环境禁止操作路由绑定 */
  17. if (stripos(Request::host(true), 'thinkadmin.top') !== false) {
  18. Route::post('admin/user/pass', function () {
  19. return json(['code' => 0, 'info' => '演示环境禁止修改用户密码!']);
  20. });
  21. Route::post('admin/index/pass', function () {
  22. return json(['code' => 0, 'info' => '演示环境禁止修改用户密码!']);
  23. });
  24. Route::post('admin/config/file', function () {
  25. return json(['code' => 0, 'info' => '演示环境禁止修改系统配置!']);
  26. });
  27. Route::post('admin/config/config', function () {
  28. return json(['code' => 0, 'info' => '演示环境禁止修改系统配置!']);
  29. });
  30. Route::post('admin/menu/index', function () {
  31. return json(['code' => 0, 'info' => '演示环境禁止给菜单排序!']);
  32. });
  33. Route::post('admin/menu/add', function () {
  34. return json(['code' => 0, 'info' => '演示环境禁止添加菜单!']);
  35. });
  36. Route::post('admin/menu/edit', function () {
  37. return json(['code' => 0, 'info' => '演示环境禁止编辑菜单!']);
  38. });
  39. Route::post('admin/menu/forbid', function () {
  40. return json(['code' => 0, 'info' => '演示环境禁止禁用菜单!']);
  41. });
  42. Route::post('admin/menu/remove', function () {
  43. return json(['code' => 0, 'info' => '演示环境禁止删除菜单!']);
  44. });
  45. Route::post('wechat/config/options', function () {
  46. return json(['code' => 0, 'info' => '演示环境禁止修改微信配置!']);
  47. });
  48. Route::post('service/config/edit', function () {
  49. return json(['code' => 0, 'info' => '演示环境禁止修改开放配置!']);
  50. });
  51. }