diff --git a/app/admin/controller/Admin.php b/app/admin/controller/Admin.php
index 724ceba..54c4882 100644
--- a/app/admin/controller/Admin.php
+++ b/app/admin/controller/Admin.php
@@ -76,7 +76,8 @@ class Admin extends AdminController
$data = Request::param();
$data['create_time'] = time();
$salt = substr(md5($data['create_time']),-6);
- $data['password'] = substr_replace(md5($data['password']),$salt,0,6);
+ $data['password'] = md5(substr_replace(md5($data['password']),$salt,0,6));
+ $data['status'] = 1;
//$adminId = Db::name('admin')->insertGetId($data);
$admin = Db::name('admin')->save($data);
//Db::name('auth_group_access')->insert(['uid'=>$adminId,'group_id'=>$data['auth_group_id']]);
diff --git a/app/admin/model/Admin.php b/app/admin/model/Admin.php
index 560aae4..55b48e9 100644
--- a/app/admin/model/Admin.php
+++ b/app/admin/model/Admin.php
@@ -25,7 +25,7 @@ class Admin extends Model
public function login($data)
{
//查询用户
- $admin = Db::name('admin')->where('username',$data['username'])->find();
+ $admin = Db::name('admin')->where('username',$data['username'])->where('delete_time',0)->find();
if($admin['status'] !=1){
return '用户被禁用或未审核,请联系管理员';
diff --git a/app/admin/view/admin/add.html b/app/admin/view/admin/add.html
index e97c388..f27c681 100644
--- a/app/admin/view/admin/add.html
+++ b/app/admin/view/admin/add.html
@@ -9,6 +9,12 @@
+
+
@@ -22,12 +28,6 @@
-
diff --git a/app/admin/view/admin/index.html b/app/admin/view/admin/index.html
index aa6c45e..c36b803 100644
--- a/app/admin/view/admin/index.html
+++ b/app/admin/view/admin/index.html
@@ -194,7 +194,7 @@
type: 2
,title: '添加管理员'
,content: 'add.html'
- ,area: ['420px', '420px']
+ ,area: ['400px', '380px']
,btn: ['确定', '取消']
,yes: function(index, layero){
var iframeWindow = window['layui-layer-iframe'+ index]
@@ -209,7 +209,7 @@
$.ajax({
type:"post",
url:"{:url('admin/admin/add')}",
- data:{"username":field.username,"password":field.username,"mobile":field.mobile,"email":field.email,"auth_group_id":field.auth_group_id,"status":field.status},
+ data:{"username":field.username,"password":field.password,"mobile":field.mobile,"email":field.email,"auth_group_id":field.auth_group_id,"status":field.status},
daType:"json",
success:function (data){
if (data.code == 0) {
diff --git a/app/install/data/taoler.sql b/app/install/data/taoler.sql
index 142a35e..583cfc4 100644
--- a/app/install/data/taoler.sql
+++ b/app/install/data/taoler.sql
@@ -330,7 +330,7 @@ CREATE TABLE `tao_system` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统配置表';
-INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区演示站', '轻论坛系统', 'http://www.xxx.com', 'taoler', '/storage/logo/logo.png', '10', '2048', 'png|gif|jpg|jpeg|zip|rarr', 'aieok.com 版权所有', 'TaoLer,轻社区系统,bbs,论坛,Thinkphp6,layui,fly模板,', '这是一个Taoler轻社区论坛系统', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.5.1', '', 'http://api.aieok.com/v1/index/cy', 'http://api.aieok.com/v1/upload/check', 'http://api.aieok.com/v1/upload/api', '1581221008', '1577419197');
+INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区演示站', '轻论坛系统', 'http://www.xxx.com', 'taoler', '/storage/logo/logo.png', '10', '2048', 'png|gif|jpg|jpeg|zip|rarr', 'aieok.com 版权所有', 'TaoLer,轻社区系统,bbs,论坛,Thinkphp6,layui,fly模板,', '这是一个Taoler轻社区论坛系统', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.5.2', '', 'http://api.aieok.com/v1/index/cy', 'http://api.aieok.com/v1/upload/check', 'http://api.aieok.com/v1/upload/api', '1581221008', '1577419197');
DROP TABLE IF EXISTS `tao_user`;