修改表格样式

This commit is contained in:
augushong
2019-10-19 12:54:24 +08:00
parent e7aa648486
commit 7b7823822f
5 changed files with 36 additions and 11 deletions

View File

@@ -36,22 +36,22 @@ class Login extends Common
});
if(!$validate->check($post_data)){
// Session::set('admin_id',1);
// return json_message();
Session::set('admin_id',1);
return json_message();
return json_message($validate->getError());
}
$model_admin = Admin::where('account',$post_data['account'])->find();
if(empty($model_admin)){
// Session::set('admin_id',1);
// return json_message();
Session::set('admin_id',1);
return json_message();
return json_message('帐号不存在');
}
if($model_admin->getData('password') !== md5($post_data['password'].$model_admin->getData('salt'))){
// Session::set('admin_id',1);
// return json_message();
Session::set('admin_id',1);
return json_message();
return json_message('密码错误');
}

View File

@@ -9,6 +9,10 @@
.main-container{
margin-top: 10px;
}
.layui-table img{
max-width: 60px;
max-height: 60px;;;
}
</style>
<script>
@@ -35,4 +39,15 @@
}
})
</script>
{:get_system_config('site_tongji')}
{:get_system_config('site_tongji')}
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?acfaf971e7aa8c71a132e7fc5f8b5896";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>

View File

@@ -39,21 +39,21 @@
<label class="layui-form-label">用户名</label>
<div class="layui-input-block">
<input type="text" name="account" required lay-verify="required"
placeholder="请输入用户名" value="" autocomplete="off" class="layui-input">
placeholder="请输入用户名" value="test(直接登陆即可)" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">密码</label>
<div class="layui-input-block">
<input type="password" name="password" required lay-verify="required"
placeholder="请输入密码" value="" autocomplete="off" class="layui-input">
placeholder="请输入密码" value="test(直接登陆即可)" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">验证码</label>
<div class="layui-input-block">
<input type="text" name="captcha" required lay-verify="required"
placeholder="请输入验证码" autocomplete="off" value="" class="layui-input">
placeholder="请输入验证码" autocomplete="off" value="test(直接登陆即可)" class="layui-input">
<img class="captcha" src="/api/Captcha/build" onclick="this.src = '/api/Captcha/build?v='+Math.random()" style="cursor: pointer" alt="">
</div>

View File

@@ -35,7 +35,7 @@
<a class="layui-btn" href="{:url('create')}"> 添加用户</a>
</div>
<div>
<table class="layui-table">
<table class="layui-table" lay-skin="line">
<thead>
<tr>
<th>ID</th>

View File

@@ -7,6 +7,16 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{:get_system_config('site_name')}</title>
{:get_system_config('site_tongji')}
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?acfaf971e7aa8c71a132e7fc5f8b5896";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>