Update Login.php

This commit is contained in:
Anyon 2019-08-02 18:59:05 +08:00
parent 79f2123099
commit 64fe65aad5

View File

@ -40,12 +40,9 @@ class Login extends Controller
$this->title = '系统登录'; $this->title = '系统登录';
if ($this->request->isGet()) { if ($this->request->isGet()) {
// 运行环境检查 // 运行环境检查
$devDomains = ['0.1', 'localhost', 'thinkadmin.top', 'ctolog.com']; $this->devMode = in_array($this->request->rootDomain(), [
if (in_array($this->request->rootDomain(), $devDomains)) { '0.1', 'localhost', 'thinkadmin.top', 'ctolog.com',
$this->devMode = true; ]);
} else {
$this->devMode = false;
}
// 登录状态检查 // 登录状态检查
if (NodeService::islogin()) { if (NodeService::islogin()) {
$this->redirect('@admin'); $this->redirect('@admin');