diff --git a/app/admin/controller/Admin.php b/app/admin/controller/Admin.php index 08bdea3..71f8de5 100644 --- a/app/admin/controller/Admin.php +++ b/app/admin/controller/Admin.php @@ -27,6 +27,7 @@ class Admin extends BaseController if (!empty($param['keywords'])) { $where[] = ['id|username|nickname|desc|mobile', 'like', '%' . $param['keywords'] . '%']; } + $where[] = ['status','>=',0]; $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; $admin = AdminList::where($where) ->order('create_time asc') @@ -212,11 +213,14 @@ class Admin extends BaseController public function delete() { $id = get_params("id"); - if ($id == 1) { - return to_assign(0, "系统拥有者,无法删除"); + if($id == 1){ + return to_assign(1, "超级管理员,不能删除"); } - if (Db::name('Admin')->delete($id) !== false) { - add_log('delete', $id, []); + $data['status'] = '-1'; + $data['id'] = $id; + $data['update_time'] = time(); + if (Db::name('Admin')->update($data) !== false) { + add_log('delete', $id); return to_assign(1, "删除管理员成功"); } else { return to_assign(0, "删除失败"); diff --git a/app/admin/controller/Article.php b/app/admin/controller/Article.php index 116c0b3..407ebc3 100644 --- a/app/admin/controller/Article.php +++ b/app/admin/controller/Article.php @@ -44,15 +44,17 @@ class Article extends BaseController if (request()->isAjax()) { $param = get_params(); if (!empty($param['id']) && $param['id'] > 0) { - try { - validate(ArticleCateCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(0, $e->getError()); - } $data[$param['field']] = $param['value']; $data['id'] = $param['id']; $data['update_time'] = time(); + if(!empty($data['title'])){ + try { + validate(ArticleCateCheck::class)->scene('edit')->check($data); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(0, $e->getError()); + } + } $res = ArticleCate::strict(false)->field(true)->update($data); if ($res) { add_log('edit', $data['id'], $data); diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index d7e9753..b153eb5 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -45,7 +45,7 @@ class Login if ($admin['pwd'] !== $param['pwd']) { return to_assign(0, '用户名或密码错误'); } - if ($admin['status'] == -1) { + if ($admin['status'] == 0) { return to_assign(0, '该用户禁止登录,请于系统所有者联系'); } $data = [ diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 577a243..06c3d91 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -41,14 +41,16 @@ class Menu extends BaseController if (request()->isAjax()) { $param = get_params(); if ($param['id'] > 0) { - try { - validate(MenuCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(0, $e->getError()); - } $data[$param['field']] = $param['value']; $data['id'] = $param['id']; + if(!empty($data['title'])){ + try { + validate(MenuCheck::class)->scene('edit')->check($data); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(0, $e->getError()); + } + } Db::name('AdminMenu')->strict(false)->field(true)->update($data); add_log('edit', $param['id'], $data); } else { diff --git a/app/admin/controller/Role.php b/app/admin/controller/Role.php index e2ad112..43d77e7 100644 --- a/app/admin/controller/Role.php +++ b/app/admin/controller/Role.php @@ -65,14 +65,6 @@ class Role extends BaseController if ($param['id'] == 1) { return to_assign(0, '为了系统安全,该管理组不允许修改'); } - /* - if (!empty($param['rules'])) { - $param['rules'] = implode(',', $param['rules']); - } - if (!empty($param['menus'])) { - $param['menus'] = implode(',', $param['menus']); - } - */ Db::name('AdminGroup')->where(['id' => $param['id']])->strict(false)->field(true)->update($param); add_log('edit', $param['id'], $param); } else { @@ -82,14 +74,6 @@ class Role extends BaseController // 验证失败 输出错误信息 return to_assign(0, $e->getError()); } - /* - if (!empty($param['rules'])) { - $param['rules'] = implode(',', $param['rules']); - } - if (!empty($param['menus'])) { - $param['menus'] = implode(',', $param['menus']); - } - */ $gid = Db::name('AdminGroup')->strict(false)->field(true)->insertGetId($param); add_log('add', $gid, $param); } diff --git a/app/admin/controller/Rule.php b/app/admin/controller/Rule.php index 552ddcb..8ff366b 100644 --- a/app/admin/controller/Rule.php +++ b/app/admin/controller/Rule.php @@ -39,14 +39,24 @@ class Rule extends BaseController if (request()->isAjax()) { $param = get_params(); if ($param['id'] > 0) { - try { - validate(RuleCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(0, $e->getError()); - } $data[$param['field']] = $param['value']; $data['id'] = $param['id']; + if(!empty($data['title'])){ + try { + validate(RuleCheck::class)->scene('edit_title')->check($data); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(0, $e->getError()); + } + } + if(!empty($data['src'])){ + try { + validate(RuleCheck::class)->scene('edit_src')->check($data); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(0, $e->getError()); + } + } Db::name('AdminRule')->strict(false)->field(true)->update($data); add_log('edit', $param['id'], $data); } else { diff --git a/app/admin/validate/AdminCheck.php b/app/admin/validate/AdminCheck.php index fb78abd..556c096 100644 --- a/app/admin/validate/AdminCheck.php +++ b/app/admin/validate/AdminCheck.php @@ -11,11 +11,14 @@ use think\Validate; class AdminCheck extends Validate { + protected $regex = [ 'checkUser' => '/^[A-Za-z]{1}[A-Za-z0-9_-]{4,19}$/']; + protected $rule = [ - 'username' => 'require|unique:admin', - 'pwd' => 'require|confirm', - 'mobile' => 'require', - 'nickname' => 'require', + 'username' => 'require|regex:checkUser|unique:admin', + 'pwd' => 'require|min:6|confirm', + 'edit_pwd' => 'min:6|confirm', + 'mobile' => 'require|mobile', + 'nickname' => 'require|chsAlpha', 'group_id' => 'require', 'id' => 'require', 'status' => 'require|checkStatus:-1,1', @@ -24,23 +27,29 @@ class AdminCheck extends Validate protected $message = [ 'username.require' => '登录账号不能为空', + 'username.regex' => '登录账号必须是以字母开头,只能包含字母数字下划线和减号,5到20位', + 'username.unique' => '同样的登录账号已经存在', 'pwd.require' => '密码不能为空', + 'pwd.min' => '密码至少要6个字符', 'pwd.confirm' => '两次密码不一致', - 'username.unique' => '同样的登录账号已经存在!', + 'edit_pwd.min' => '密码至少要6个字符', + 'edit_pwd.confirm' => '两次密码不一致', 'mobile.require' => '手机不能为空', + 'mobile.mobile' => '手机格式错误', 'nickname.require' => '昵称不能为空', + 'nickname.chsAlpha' => '昵称只能是汉子和字母', 'group_id.require' => '至少要选择一个用户角色', 'id.require' => '缺少更新条件', 'status.require' => '状态为必选', - 'status.checkStatus' => '系统所有者不能被禁用!', + 'status.checkStatus' => '系统所有者不能被禁用', 'old_pwd.require' => '请提供旧密码', 'old_pwd.different' => '新密码不能和旧密码一样', ]; protected $scene = [ - 'add' => ['phone', 'nickname', 'group_id', 'pwd', 'username', 'status'], - 'edit' => ['phone', 'nickname', 'group_id', 'id', 'username.unique', 'status'], - 'editPersonal' => ['phone', 'nickname'], + 'add' => ['mobile', 'nickname', 'group_id', 'pwd', 'username', 'status'], + 'edit' => ['mobile', 'nickname', 'group_id', 'edit_pwd','id', 'username', 'status'], + 'editPersonal' => ['mobile', 'nickname'], 'editpwd' => ['old_pwd', 'pwd'], ]; diff --git a/app/admin/validate/ArticleCateCheck.php b/app/admin/validate/ArticleCateCheck.php index c03f506..92e8a29 100644 --- a/app/admin/validate/ArticleCateCheck.php +++ b/app/admin/validate/ArticleCateCheck.php @@ -13,21 +13,17 @@ class ArticleCateCheck extends Validate { protected $rule = [ 'title' => 'require|unique:article_cate', - 'pid' => 'require', 'id' => 'require', - 'field' => 'require', ]; protected $message = [ 'title.require' => '名称不能为空', - 'pid.require' => '父级分类为必选', - 'title.unique' => '同样的记录已经存在', + 'title.unique' => '同样的名称已经存在', 'id.require' => '缺少更新条件', - 'filed.require' => '缺少要更新的字段名', ]; protected $scene = [ - 'add' => ['title', 'pid'], - 'edit' => ['id', 'field', 'title.unique'], + 'add' => ['title'], + 'edit' => ['id', 'title'], ]; } diff --git a/app/admin/validate/ArticleCheck.php b/app/admin/validate/ArticleCheck.php index 10ec19b..c72538f 100644 --- a/app/admin/validate/ArticleCheck.php +++ b/app/admin/validate/ArticleCheck.php @@ -21,14 +21,14 @@ class ArticleCheck extends Validate protected $message = [ 'title.require' => '标题不能为空', + 'title.unique' => '同样的文章标题已经存在', 'article_cate_id.require' => '所属分类为必选', - 'title.unique' => '同样的记录已经存在!', 'id.require' => '缺少更新条件', 'status.require' => '状态为必选', ]; protected $scene = [ - 'add' => ['title', 'thumb', 'article_cate_id', 'content', 'status'], - 'edit' => ['title', 'thumb', 'article_cate_id', 'content', 'id', 'status'], + 'add' => ['title', 'article_cate_id', 'content', 'status'], + 'edit' => ['title', 'article_cate_id', 'content', 'id', 'status'], ]; } diff --git a/app/admin/validate/ConfCheck.php b/app/admin/validate/ConfCheck.php index e750f4f..0645e17 100644 --- a/app/admin/validate/ConfCheck.php +++ b/app/admin/validate/ConfCheck.php @@ -18,8 +18,8 @@ class ConfCheck extends Validate protected $message = [ 'title.require' => '配置名称不能为空', - 'name.require' => '配置标识不能为空', 'title.unique' => '同样的配置名称已经存在', + 'name.require' => '配置标识不能为空', 'name.unique' => '同样的配置标识已经存在', ]; } diff --git a/app/admin/validate/GroupCheck.php b/app/admin/validate/GroupCheck.php index 5bf5f25..b913c21 100644 --- a/app/admin/validate/GroupCheck.php +++ b/app/admin/validate/GroupCheck.php @@ -19,10 +19,10 @@ class GroupCheck extends Validate protected $message = [ 'title.require' => '名称不能为空', - 'title.unique' => '同样的记录已经存在!', + 'title.unique' => '同样的记录已经存在', 'id.require' => '缺少更新条件', 'status.require' => '状态为必选', - 'status.checkStatus' => '系统所有者组不能被禁用!', + 'status.checkStatus' => '系统所有者组不能被禁用', ]; protected $scene = [ diff --git a/app/admin/validate/KeywordsCheck.php b/app/admin/validate/KeywordsCheck.php index 87769b1..9c1dd2e 100644 --- a/app/admin/validate/KeywordsCheck.php +++ b/app/admin/validate/KeywordsCheck.php @@ -13,13 +13,13 @@ use think\Validate; class KeywordsCheck extends Validate { protected $rule = [ - 'title' => 'require|checkUnique', + 'title' => 'require|unique:keywords', 'id' => 'require', ]; protected $message = [ 'title.require' => '关键字名称不能为空', - 'title.checkUnique' => '同样的关键字名称已经存在', + 'title.unique' => '同样的关键字名称已经存在', 'id.require' => '缺少更新条件', ]; @@ -28,20 +28,4 @@ class KeywordsCheck extends Validate 'edit' => ['id', 'title'], ]; - //自定义验证规则 - protected function checkUnique($value, $rule, $data) - { - if (isset($data['id'])) { - $unique = Db::name('keywords')->where([['id', '<>', $data['id']], ['title', '=', $value], ['status', '>=', 0]])->value('id'); - } else { - $unique = Db::name('keywords')->where([['title', '=', $value], ['status', '>=', 0]])->value('id'); - } - - if ($unique) { - return false; - } else { - return true; - } - } - } diff --git a/app/admin/validate/MenuCheck.php b/app/admin/validate/MenuCheck.php index d889db1..a9a2a23 100644 --- a/app/admin/validate/MenuCheck.php +++ b/app/admin/validate/MenuCheck.php @@ -13,21 +13,17 @@ class MenuCheck extends Validate { protected $rule = [ 'title' => 'require|unique:admin_menu', - 'pid' => 'require', 'id' => 'require', - 'field' => 'require', ]; protected $message = [ 'title.require' => '菜单名称不能为空', - 'pid.require' => '父级菜单为必选', 'title.unique' => '同样的菜单名称已经存在', 'id.require' => '缺少更新条件', - 'filed.require' => '缺少要更新的字段名', ]; protected $scene = [ - 'add' => ['title', 'pid'], - 'edit' => ['id', 'field', 'title.unique'], + 'add' => ['title'], + 'edit' => ['id','title'], ]; } diff --git a/app/admin/validate/NavCheck.php b/app/admin/validate/NavCheck.php index 8345c8c..8ad9492 100644 --- a/app/admin/validate/NavCheck.php +++ b/app/admin/validate/NavCheck.php @@ -21,9 +21,9 @@ class NavCheck extends Validate protected $message = [ 'title.require' => '标题不能为空', + 'title.unique' => '同样的标题已经存在', 'name.require' => '标识不能为空', - 'title.unique' => '同样的记录已经存在!', - 'name.unique' => '同样的记录已经存在!', + 'name.unique' => '同样的标识已经存在', 'id.require' => '缺少更新条件', 'status.require' => '状态为必选', 'slide_id.require' => '缺少导航组ID', diff --git a/app/admin/validate/RuleCheck.php b/app/admin/validate/RuleCheck.php index 4a083cf..d0489ff 100644 --- a/app/admin/validate/RuleCheck.php +++ b/app/admin/validate/RuleCheck.php @@ -14,14 +14,11 @@ class RuleCheck extends Validate protected $rule = [ 'title' => 'require|unique:admin_rule', 'src' => 'unique:admin_rule', - 'pid' => 'require', 'id' => 'require', - 'field' => 'require', ]; protected $message = [ 'title.require' => '节点名称不能为空', - 'pid.require' => '父级节点为必选', 'title.unique' => '同样的节点名称已经存在', 'src.unique' => '同样的节点规则已经存在', 'id.require' => '缺少更新条件', @@ -29,7 +26,8 @@ class RuleCheck extends Validate ]; protected $scene = [ - 'add' => ['title', 'pid', 'src'], - 'edit' => ['id', 'field', 'title.unique', 'src.unique'], + 'add' => ['title','src'], + 'edit_title' => ['id', 'title'], + 'edit_src' => ['id', 'src'], ]; } diff --git a/app/admin/validate/SitemapCateCheck.php b/app/admin/validate/SitemapCateCheck.php index b5d78e1..4246f1b 100644 --- a/app/admin/validate/SitemapCateCheck.php +++ b/app/admin/validate/SitemapCateCheck.php @@ -18,7 +18,7 @@ class SitemapCateCheck extends Validate protected $message = [ 'name.require' => '名称不能为空', - 'name.unique' => '同样的记录已经存在!', + 'name.unique' => '同样的名称已经存在', 'id.require' => '缺少更新条件', ]; diff --git a/app/admin/validate/SlideCheck.php b/app/admin/validate/SlideCheck.php index fea818e..6b694d9 100644 --- a/app/admin/validate/SlideCheck.php +++ b/app/admin/validate/SlideCheck.php @@ -22,9 +22,9 @@ class SlideCheck extends Validate protected $message = [ 'title.require' => '标题不能为空', + 'title.unique' => '同样的标题已经存在', 'name.require' => '标识不能为空', - 'title.unique' => '同样的记录已经存在!', - 'name.unique' => '同样的记录已经存在!', + 'name.unique' => '同样的标识已经存在', 'id.require' => '缺少更新条件', 'status.require' => '状态为必选', 'img.require' => '请上传图片', diff --git a/app/admin/view/admin/add.html b/app/admin/view/admin/add.html index cc31e36..677accb 100644 --- a/app/admin/view/admin/add.html +++ b/app/admin/view/admin/add.html @@ -106,12 +106,12 @@ 密码 - + - 确认密码* + 确认密码 - + diff --git a/app/admin/view/article/add.html b/app/admin/view/article/add.html index 16aa267..4de6e13 100644 --- a/app/admin/view/article/add.html +++ b/app/admin/view/article/add.html @@ -18,20 +18,16 @@ {/volist} - 关键字 + 关键字* - - 属性 + 状态* - + + @@ -44,10 +40,14 @@ - 状态* + 属性 - - + diff --git a/app/admin/view/article/cate.html b/app/admin/view/article/cate.html index 269c352..a44f66a 100644 --- a/app/admin/view/article/cate.html +++ b/app/admin/view/article/cate.html @@ -11,7 +11,7 @@ {block name="body"}
- + 添加分类 + + 添加分类点击表格内容可编辑
@@ -67,8 +67,11 @@ type:'post', data:{id:obj.data.id,field:obj.field,value:obj.value}, success:function(res){ - if(res.code == 1){ - layer.msg(res.msg); + layer.msg(res.msg); + if(res.code == 0){ + setTimeout(function(){ + location.reload() + },2000) } } }) diff --git a/app/admin/view/article/edit.html b/app/admin/view/article/edit.html index 45e7eab..0947d41 100644 --- a/app/admin/view/article/edit.html +++ b/app/admin/view/article/edit.html @@ -19,20 +19,16 @@ {/volist} - 关键字 + 关键字* - - 属性 + 状态* - + + @@ -46,10 +42,14 @@ - 状态* + 属性 - - + diff --git a/app/admin/view/login/index.html b/app/admin/view/login/index.html index b248311..82afb19 100644 --- a/app/admin/view/login/index.html +++ b/app/admin/view/login/index.html @@ -51,10 +51,10 @@
- +
- +
diff --git a/app/admin/view/menu/index.html b/app/admin/view/menu/index.html index 472407a..9413182 100644 --- a/app/admin/view/menu/index.html +++ b/app/admin/view/menu/index.html @@ -13,7 +13,7 @@ {block name="body"}
- + 添加菜单 + + 添加菜单点击表格内容可编辑
@@ -63,9 +63,11 @@ type: 'post', data: { id: obj.data.id, field: obj.field, value: obj.value }, success: function (res) { - if (res.code == 1) { - layer.msg(res.msg); - setTimeout('location.reload()', 2000); + layer.msg(res.msg); + if(res.code == 0){ + setTimeout(function(){ + location.reload() + },2000) } } }) diff --git a/app/admin/view/rule/index.html b/app/admin/view/rule/index.html index fd7cf2e..47d8e48 100644 --- a/app/admin/view/rule/index.html +++ b/app/admin/view/rule/index.html @@ -13,7 +13,7 @@ {block name="body"}
- + 添加节点 + + 添加节点点击表格内容可编辑
@@ -63,9 +63,11 @@ type: 'post', data: { id: obj.data.id, field: obj.field, value: obj.value }, success: function (res) { - if (res.code == 1) { - layer.msg(res.msg); - setTimeout('location.reload()', 2000); + layer.msg(res.msg); + if(res.code == 0){ + setTimeout(function(){ + location.reload() + },2000) } } }) diff --git a/app/home/controller/Login.php b/app/home/controller/Login.php index b1f95ef..30daac4 100644 --- a/app/home/controller/Login.php +++ b/app/home/controller/Login.php @@ -36,6 +36,7 @@ class Login { $url = $_SERVER["HTTP_REFERER"]; //获取完整的来路URL $str = str_replace("http://","",$url); //去掉http:// + $str = str_replace("https://","",$str); //去掉https:// $strdomain = explode("/",$str); // 以“/”分开成数组 $domain = $strdomain[0]; //取第一个“/”以前的字符 add_user_log('install', '系统',0,['domain'=>$domain]); @@ -57,7 +58,7 @@ class Login return to_assign(0, $e->getError()); } - $user = Db::name('User')->where(['username' => $param['username']])->find(); + $user = Db::name('User')->where(['username' => $param['name']])->find(); if (empty($user)) { return to_assign(0, '用户名或密码错误'); } diff --git a/app/home/validate/UserCheck.php b/app/home/validate/UserCheck.php index 96a8617..1718cba 100644 --- a/app/home/validate/UserCheck.php +++ b/app/home/validate/UserCheck.php @@ -11,16 +11,21 @@ use think\Validate; class UserCheck extends Validate { + protected $regex = [ 'checkUser' => '/^[A-Za-z]{1}[A-Za-z0-9_-]{4,19}$/']; protected $rule = [ - 'username' => 'require', + 'name' => 'require', 'password' => 'require', + 'username' => 'require|regex:checkUser|unique:user', 'pwd' => 'require|min:6|confirm', 'captcha' => 'require|captcha', ]; protected $message = [ - 'username.require' => '账号不能为空', + 'name.require' => '账号不能为空', 'password.require' => '密码不能为空', + 'username.require' => '账号不能为空', + 'username.regex' => '账号必须是以字母开头,只能包含字母数字下划线和减号,5到20位', + 'username.unique' => '同样的登录账号已经存在', 'pwd.require' => '密码不能为空', 'pwd.min' => '密码必须6位以上', 'pwd.confirm' => '两次密码不一致', //confirm自动相互验证 @@ -29,7 +34,7 @@ class UserCheck extends Validate ]; protected $scene = [ - 'login' => ['username', 'password', 'captcha'], + 'login' => ['name', 'password', 'captcha'], 'reg' => ['username', 'pwd', 'captcha'], ]; diff --git a/app/home/view/common/header.html b/app/home/view/common/header.html index de95c54..bb67df1 100644 --- a/app/home/view/common/header.html +++ b/app/home/view/common/header.html @@ -6,7 +6,7 @@
+
+
+ + 轻巧的技术博客系统 +
    +
  • ● 基于勾股CMS二次开发,一脉相承
  • +
  • ● 简约、易用、轻快、内存低等特点
  • +
+
    +
  • ● 集成文章、动态、归档、访问统计等功能
  • +
  • ● 可做博客,工作室,自媒体等各类网站
  • +
+ 免费开源 +
+
+
+
功能矩阵
+
系统后台集成了主流的通用功能,如:登录验证、系统配置、操作日志管理、用户(组)管理、用户(组)权限、功能管理(后台菜单管理)、导航设置、网站地图、轮播广告、TAG关键字管理、文件上传、数据备份/还原、文章功能、用户管理、用户操作日志、用户注册/登录等。更多的个性化功能可以基于当前系统便捷做二次开发。
+
+
+ +
+
+
+
+ +

系统管理

+
+
    +
  • 系统配置
  • +
  • 功能菜单
  • +
  • 功能节点
  • +
  • 权限角色
  • +
  • 管 理 员
  • +
  • 操作日志
  • +
  • 系统配置
  • +
  • 数据备份
  • +
  • 数据还原
  • +
+
+
+
+ +

基础数据

+
+
    +
  • 导航设置
  • +
  • 网站地图
  • +
  • 轮播广告
  • +
  • SEO关键字
  • +
  • 搜索关键词
  • +
+
+
+
+ +

平台用户

+
+
    +
  • 用户列表
  • +
  • 操作记录
  • +
  • 操作日志
  • +
+
+
+
+ +

资讯中心

+
+
    +
  • 文章分类
  • +
  • 文章列表
  • +
+
+
+
{/block} diff --git a/app/home/view/index/logs.html b/app/home/view/index/logs.html index 29caba6..ef1167e 100644 --- a/app/home/view/index/logs.html +++ b/app/home/view/index/logs.html @@ -11,6 +11,33 @@

更新日志

    +
  • + + +
    +
    +

    1.0.9

    +
    +
    +

    规范登录账号的格式,新增api请求接口操作日志。

    +
    +
      +
    • + +

      v1.2021.09.01 2021-09-01

      +
        +
      • 顶部导航新增当前高亮状态
      • +
      • 新增后台账号规范:必须是以字母开头,只能包含字母数字下划线和减号,5到20位
      • +
      • 新增用户注册账号规范:必须是以字母开头,只能包含字母数字下划线和减号,5到20位
      • +
      • 后台各个模块的数据校验优化
      • +
      • 修改CMS的描述
      • +
      • 系统首页增加功能描述
      • +
      • 新增开发日志页面
      • +
      +
    • +
    +
    +
  • diff --git a/app/home/view/login/index.html b/app/home/view/login/index.html index 2acda43..a9db3ae 100644 --- a/app/home/view/login/index.html +++ b/app/home/view/login/index.html @@ -184,7 +184,7 @@
    -
    diff --git a/app/install/data/gougucms.sql b/app/install/data/gougucms.sql index 5f41953..ae9679b 100644 --- a/app/install/data/gougucms.sql +++ b/app/install/data/gougucms.sql @@ -423,9 +423,9 @@ CREATE TABLE `cms_nav_info` ( -- ----------------------------- -- Records of `cms_nav_info` -- ----------------------------- -INSERT INTO `cms_nav_info` VALUES ('1', '0', '1', '首页', '/', '', '0', '1', '1', '0', '0'); -INSERT INTO `cms_nav_info` VALUES ('2', '0', '1', '文档', '/', '', '0', '1', '2', '0', '0'); -INSERT INTO `cms_nav_info` VALUES ('3', '0', '1', '社区', '/', '', '0', '1', '3', '0', '0'); +INSERT INTO `cms_nav_info` VALUES ('1', '0', '1', '首页', '/', 'index', '0', '1', '1', '0', '0'); +INSERT INTO `cms_nav_info` VALUES ('2', '0', '1', '开发日志', 'https://www.gougucms.com/home/index/logs.html', 'logs', '1', '1', '2', '0', '0'); +INSERT INTO `cms_nav_info` VALUES ('3', '0', '1', '博客社区', 'https://blog.gougucms.com/', '', '0', '1', '3', '0', '0'); INSERT INTO `cms_nav_info` VALUES ('4', '0', '1', 'API接口', '/api/index', '', '1', '1', '4', '0', '0'); INSERT INTO `cms_nav_info` VALUES ('5', '0', '1', '腾讯云优惠', 'https://curl.qcloud.com/PPEgI0oV', '', '1', '1', '5', '0', '0'); INSERT INTO `cms_nav_info` VALUES ('6', '0', '1', '阿里云特惠', 'https://www.aliyun.com/activity/daily/bestoffer?userCode=dmrcx154', '', '1', '1', '6', '0', '0'); diff --git a/public/index.php b/public/index.php index 0eedf5e..08b0614 100644 --- a/public/index.php +++ b/public/index.php @@ -8,10 +8,14 @@ // [ 应用入口文件 ] namespace think; +if (empty(file_exists(__DIR__ . '/../vendor/autoload.php'))) { + echo '您还未安装PHP依赖包,请输入命令安装:composer install,安装教程点击这里。'; + exit; +} require __DIR__ . '/../vendor/autoload.php'; // 定义当前版本号 -define('CMS_VERSION','1.0.0'); +define('CMS_VERSION','1.09.01'); // 定义ThinkPHP版本号 define('TP_VERSION','6.0.5'); diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css index 9805436..eb7b43b 100644 --- a/public/static/home/css/common.css +++ b/public/static/home/css/common.css @@ -79,16 +79,19 @@ a:active {color:#4385F5;} .nav-logo a{width:210px; height:60px; display:block;} .nav-menu{font-size:16px;} -.nav-menu li{height:60px; float:left; color:#fff;} -.nav-menu li a.nav-a{height:60px; min-width:36px; text-align:center; line-height:60px; padding:0 25px; display:inline-block; color:#323232;transition: all 0.6s ;} -.nav-menu li a.nav-a:hover{color:#4385F5; transition: all 0.6s;} -.nav-menu li.on a.nav-a{color:#4385F5} +.nav-menu li{height:60px; float:left; color:#fff; padding: 0 20px;} +.nav-menu li a.nav-a{height:60px; position: relative; min-width:36px; text-align:center; line-height:60px; padding:0 3px; display:inline-block; color:#323232;transition: all 0.6s ;} +.nav-menu li a.nav-a:hover{color:#186AF2; transition: all 0.6s;} +.nav-menu li.on a.nav-a{color:#186AF2} -.nav-menu li.nav-login{position:relative; padding-left:25px} -.nav-menu li.nav-login a.nav-a{padding:0 2px; margin:0 5px} -.nav-menu li.nav-login span{padding:5px 16px 6px; border-radius:3px; font-size:14px; background-color:#EB4336; color:#fff} -.nav-menu li.nav-login span.login-span{background-color: #4385F5;} +.nav-menu li.nav-login{position:relative; padding-left:20px; padding-right: 0;} +.nav-menu li.nav-login a.nav-a{padding:0 2px; margin-left:5px} +.nav-menu li.nav-login span{padding:5px 16px 6px; border-radius:3px; font-size:14px; background-color:#186AF2; color:#fff} +.nav-menu li.nav-login span.reg-span{background-color:#EA4335;} +.nav-menu li a.nav-a:hover{color:#186AF2; transition: all 0.6s;} +.nav-menu li.on a.nav-a{color:#186AF2} .nav-menu li.nav-login a:hover span{opacity:0.8;transition: all 0.5s;} +.nav-menu li.on a.nav-a:after { position: absolute; bottom: -1px; left: 0; content: ''; height: 3px; width: 100%; background-color: #186AF2;} .nav-login-box{width:320px; border-radius:2px; position:absolute; top:60px; right:0; background-color:#fff; z-index:-1; color:#333; font-size:14px;-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transition:.2s;transition:.2s;opacity:0;-webkit-transform-origin:center top;transform-origin:center top;-webkit-box-shadow:0 15px 30px rgba(0,0,0,.2);box-shadow:0 15px 30px rgba(0,0,0,.2);} .login-note{padding: 15px 15px 0; color: #FF5722;} diff --git a/public/static/home/css/index.css b/public/static/home/css/index.css index 5c406f5..fd73718 100644 --- a/public/static/home/css/index.css +++ b/public/static/home/css/index.css @@ -31,3 +31,29 @@ .part-text {text-align: left; line-height: 1.6;font-size: 14px; color: #888; padding: 10px 0;} .feature:hover .part-text h3,.feature:hover .part-text {color: #fff;} .part-icon img { width: 60px;height: 60px;} + +.cms-banner{width:100%; height:120px; background-color:#4385F5} +.blog {width: 1220px;margin: auto; padding: 30px 0; color: rgba(255,255,255,0.9);overflow: hidden;} +.blog img {display: block; float: left; height: 60px; margin-right: 2px;} +.blog span { display: block; float: left; line-height: 60px; margin-right:39px; font-size: 28px; font-weight: 100;} +.blog ul { overflow: hidden; float: left; margin: 0 39px 0 0;} +.blog ul li {font-size: 15px; padding: 5px 0;} +.blog a {float: right;display: block; margin-top: 12px; padding: 6px 24px 7px; border: solid 2px #ed5d18; border-radius: 100px; background: #ed5d18; color: #fff; font-size: 16px; } + +.function {background:#f2f2f2; width: 100%; text-align: center; padding: 100px 0;} +.function-title{font-size: 42px; font-weight: 500; text-align: center; font-weight: 100;} +.function-sub-title{font-size: 18px; padding: 20px 0 160px; line-height:2; font-weight: 100; text-align: left; width:1220px; margin:0 auto;} +.function-wrap{width:1220px;position: relative; margin:0 auto; background-color: #fff; padding:180px 0 30px; border-radius: 10px; box-shadow: 0 0 10px rgb(0 0 0 / 10%);} +.function-img{width: 100%;position: absolute; top: -96px;} +.function-main{display: flex; justify-content: center; padding: 30px; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; +} + +.function-item { width: 246px; font-size: 14px; line-height: 1.5; margin:0 30px; word-wrap: break-word;} +.item-box{padding: 15px 0; background-color: #4385F5; background: linear-gradient(to left, #4385F5, #00aaff); border-radius: 8px; color: #fff;margin-bottom: 10px;} +.function-item ul li { width: 40%; float: left; padding:5px 5%; text-align: left;} +.function-item ul li span{font-size: 16px; color: #4385F5; font-weight: 800; margin-right: 3px;} +.item-box h3{font-size: 18px; font-weight: 100;} +.item-box img{height:80px;} \ No newline at end of file diff --git a/public/static/home/images/actrcle.png b/public/static/home/images/actrcle.png new file mode 100644 index 0000000..162b15d Binary files /dev/null and b/public/static/home/images/actrcle.png differ diff --git a/public/static/home/images/data.png b/public/static/home/images/data.png new file mode 100644 index 0000000..804b05d Binary files /dev/null and b/public/static/home/images/data.png differ diff --git a/public/static/home/images/function.png b/public/static/home/images/function.png new file mode 100644 index 0000000..da6fc2f Binary files /dev/null and b/public/static/home/images/function.png differ diff --git a/public/static/home/images/system.png b/public/static/home/images/system.png new file mode 100644 index 0000000..fdc186b Binary files /dev/null and b/public/static/home/images/system.png differ diff --git a/public/static/home/images/user.png b/public/static/home/images/user.png new file mode 100644 index 0000000..0bb7cc1 Binary files /dev/null and b/public/static/home/images/user.png differ