demo.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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\Route;
  15. /* 测试环境禁止操作路由绑定 */
  16. if (in_array(request()->rootDomain(), ['ctolog.com', 'thinkadmin.top'])) {
  17. Route::post('admin/user/pass', function () {
  18. return json(['code' => 0, 'info' => '测试环境禁修改用户密码!']);
  19. });
  20. Route::post('admin/index/pass', function () {
  21. return json(['code' => 0, 'info' => '测试环境禁修改用户密码!']);
  22. });
  23. Route::post('admin/config/save', function () {
  24. return json(['code' => 0, 'info' => '测试环境禁修改文件配置操作!']);
  25. });
  26. Route::post('admin/menu/index', function () {
  27. return json(['code' => 0, 'info' => '测试环境禁排序菜单操作!']);
  28. });
  29. Route::post('admin/menu/add', function () {
  30. return json(['code' => 0, 'info' => '测试环境禁添加菜单操作!']);
  31. });
  32. Route::post('admin/menu/edit', function () {
  33. return json(['code' => 0, 'info' => '测试环境禁编辑菜单操作!']);
  34. });
  35. Route::post('admin/menu/forbid', function () {
  36. return json(['code' => 0, 'info' => '测试环境禁止禁用菜单操作!']);
  37. });
  38. Route::post('admin/menu/del', function () {
  39. return json(['code' => 0, 'info' => '测试环境禁止删除菜单操作!']);
  40. });
  41. Route::post('admin/node/save', function () {
  42. return json(['code' => 0, 'info' => '测试环境禁止修改节点数据操作!']);
  43. });
  44. Route::post('wechat/config/index', function () {
  45. return json(['code' => 0, 'info' => '测试环境禁止修改微信配置操作!']);
  46. });
  47. Route::post('wechat/config/options', function () {
  48. return json(['code' => 0, 'info' => '测试环境禁止修改微信配置操作!']);
  49. });
  50. Route::post('service/config/index', function () {
  51. return json(['code' => 0, 'info' => '测试环境禁止修改微信配置操作!']);
  52. });
  53. }