demo.php 2.6 KB

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