[更新]修改后台登录样式

This commit is contained in:
Anyon 2019-07-29 18:18:10 +08:00
parent 6e4957872f
commit f0cc148da5
3 changed files with 14 additions and 4 deletions

View File

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

View File

@ -4,11 +4,13 @@
<div class="login-container" data-supersized="__ROOT__/static/theme/img/login/bg1.jpg,__ROOT__/static/theme/img/login/bg2.jpg">
<div class="header notselect layui-hide-xs">
<a href="{:url('@')}" class="title">{:sysconf('app_name')}<span class="padding-left-5 font-s10">{:sysconf('app_version')}</span></a>
{notempty name='devMode'}
<a class="pull-right layui-anim layui-anim-fadein" href='https://gitee.com/zoujingli/ThinkAdmin'>
<img src='https://gitee.com/zoujingli/ThinkAdmin/widgets/widget_1.svg' alt='Fork me on Gitee'>
</a>
{/notempty}
</div>
<form data-login-form onsubmit="return false;" method="post" class="layui-anim layui-anim-upbit" autocomplete="off">
<form data-login-form onsubmit="return false" method="post" class="layui-anim layui-anim-upbit" autocomplete="off">
<h2 class="notselect">系统管理</h2>
<ul>
<li class="username">
@ -45,4 +47,4 @@
{block name='script'}
<script src="__ROOT__/static/plugs/supersized/supersized.3.2.7.min.js"></script>
{/block}
{/block}

View File

@ -49,8 +49,8 @@
{if auth("admin/menu/add")}
<span class="text-explode">|</span>
<!--{if $vo.spt<2}-->
<a class="layui-btn layui-btn-xs layui-btn-primary" data-tips-text="添加子菜单" data-modal='{:url("add")}?pid={$vo.id}'>添 加</a>
<!--{if $vo.spt < 2}-->
<a class="layui-btn layui-btn-xs layui-btn-primary" data-title="添加子菜单" data-modal='{:url("add")}?pid={$vo.id}'>添 加</a>
<!--{else}-->
<a class="layui-btn layui-btn-xs layui-btn-disabled">添 加</a>
<!--{/if}-->