Browse Source

Update demo.php

Anyon 5 years ago
parent
commit
87025970dc
1 changed files with 5 additions and 2 deletions
  1. 5 2
      route/admin/demo.php

+ 5 - 2
route/admin/demo.php

@@ -13,8 +13,11 @@
 // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
 // +----------------------------------------------------------------------
 
-/* 演示环境禁止操作路由绑定 */
-if (stripos(app()->request->rootDomain(), 'thinkadmin.top') !== false) {
+
+use think\admin\service\SystemService;
+
+// 演示环境禁止操作路由绑定
+if (SystemService::instance()->checkRunMode('demo')) {
     app()->route->post('index/pass', function () {
         return json(['code' => 0, 'info' => '演示环境禁止修改用户密码!']);
     });