From ee7ef789f06235ec060c2fe95087e671f7f75642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B8=91=E8=B7=AF=E4=BA=BA?= <2278757482@qq.com> Date: Fri, 5 Feb 2021 18:37:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2021_02_05_182009_create_users_table.php | 40 ++++++++++++++ ...1_02_05_182022_create_user_infos_table.php | 53 +++++++++++++++++++ ...5_182030_create_user_otherlogins_table.php | 33 ++++++++++++ ...82048_create_user_email_verifies_table.php | 40 ++++++++++++++ ...05_182059_create_user_login_logs_table.php | 42 +++++++++++++++ ...21_02_05_182104_create_user_logs_table.php | 46 ++++++++++++++++ ..._02_05_182120_create_user_grades_table.php | 38 +++++++++++++ ...1_02_05_182135_create_user_signs_table.php | 43 +++++++++++++++ 8 files changed, 335 insertions(+) create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182009_create_users_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182022_create_user_infos_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182030_create_user_otherlogins_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182048_create_user_email_verifies_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182059_create_user_login_logs_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182104_create_user_logs_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182120_create_user_grades_table.php create mode 100644 app/Modules/Bbs/Database/Migrations/2021_02_05_182135_create_user_signs_table.php diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182009_create_users_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182009_create_users_table.php new file mode 100644 index 0000000..a406077 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182009_create_users_table.php @@ -0,0 +1,40 @@ +engine = 'InnoDB'; + $table->bigIncrements('user_id')->unsigned()->comment('会员登录表'); + $table->string('user_mobile', 15)->default('')->comment('手机号'); + $table->string('user_name', 256)->default('')->comment('用户名'); + $table->string('user_email', 256)->default('')->comment('邮箱'); + $table->string('password', 60)->default('')->comment('登录密码'); + $table->string('oauth_password', 256)->default('')->comment('用于第三方登录【如果账户修改了登录密码,jwt登录【需要账户与密码才可以】,hash加密又无法解密,将导致无法快捷与账户登录。】'); + $table->string('login_token', 100)->default('')->comment('login_token【用于提示是否异地登录,jwt-token只能检测是否登录---这个效果其实用不用都可以的,需要看心情。】'); + $table->boolean('is_check')->unsigned()->default(1)->comment('是否审核:1:正常;0:禁用;2.踢出登录,重新登录'); + $table->index(['is_check']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182022_create_user_infos_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182022_create_user_infos_table.php new file mode 100644 index 0000000..bc6cf43 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182022_create_user_infos_table.php @@ -0,0 +1,53 @@ +engine = 'InnoDB'; + $table->bigInteger('user_id')->unsigned()->default(0)->comment('用户的id-会员基本信息表'); + $table->uuid('user_uuid')->default('')->comment('UUID'); + $table->string('pay_pass', 60)->default('')->comment('支付密码'); + $table->string('nick_name', 256)->default('')->comment('昵称'); + $table->string('user_head', 256)->default('')->comment('头像'); + $table->boolean('user_sex')->unsigned()->default('0')->comment('性别:0:男;1:女;2.保密'); + $table->integer('user_birth')->unsigned()->default('0')->comment('出生年月日'); + $table->string('created_ip', 20)->default('')->comment('创建时的IP'); + $table->string('browser_type', 256)->default('')->comment('创建时浏览器类型'); + $table->integer('user_grade')->unsigned()->default(0)->comment('用户等级'); + $table->integer('user_experience')->unsigned()->default('0')->comment('用户经验'); + $table->boolean('auth_status')->unsigned()->default(0)->comment('实名认证状态:0:否,1:是'); + $table->boolean('auth_mobile')->unsigned()->default(0)->comment('手机号验证状态:0:否,1:是'); + $table->boolean('auth_email')->unsigned()->default(0)->comment('邮箱验证状态:0:否,1:是'); + $table->integer('created_time')->unsigned()->default(0)->comment('创建时间'); + $table->integer('updated_time')->unsigned()->default(0)->comment('更新时间'); + $table->integer('last_actived_time')->unsigned()->default(0)->comment('上次活跃时间'); + $table->integer('notification_count')->unsigned()->default(0)->comment('未读消息'); + $table->string('user_introduction', 500)->default('')->comment('个人介绍'); + $table->primary('user_id'); + $table->index(['user_grade']); + $table->index(['auth_status']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_infos'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182030_create_user_otherlogins_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182030_create_user_otherlogins_table.php new file mode 100644 index 0000000..fcfeda7 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182030_create_user_otherlogins_table.php @@ -0,0 +1,33 @@ +id(); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_otherlogins'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182048_create_user_email_verifies_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182048_create_user_email_verifies_table.php new file mode 100644 index 0000000..87657c5 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182048_create_user_email_verifies_table.php @@ -0,0 +1,40 @@ +engine = 'InnoDB'; + $table->bigIncrements('verify_id')->unsigned()->comment('邮箱验证表'); + $table->bigInteger('user_id')->unsigned()->default('0')->comment('会员Id'); + $table->string('user_email', 100)->default('')->comment('邮箱'); + $table->string('verify_token', 256)->default('')->comment('验证TOKEN'); + $table->boolean('auth_email')->unsigned()->default(0)->comment('邮箱验证状态:0:否,1:是'); + $table->integer('created_time')->unsigned()->default(0)->comment('创建时间'); + $table->integer('updated_time')->unsigned()->default(0)->comment('更新时间'); + $table->index(['user_id']); + $table->index(['auth_email']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_email_verifies'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182059_create_user_login_logs_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182059_create_user_login_logs_table.php new file mode 100644 index 0000000..5d2ba25 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182059_create_user_login_logs_table.php @@ -0,0 +1,42 @@ +engine = 'InnoDB'; + $table->bigIncrements('log_id')->unsigned()->comment('会员登录日志记录表'); + $table->bigInteger('user_id')->unsigned()->default(0)->comment('用户的id'); + $table->string('created_ip', 20)->default('')->comment('创建时的IP'); + $table->boolean('is_public')->unsigned()->default(1)->comment('是否展示:1.展示;0.会员删除;2.管理员删除'); + $table->boolean('log_status')->unsigned()->default(1)->comment('状态:1.成功;0.失败'); + $table->integer('created_time')->unsigned()->default(0)->comment('创建时间'); + $table->integer('updated_time')->unsigned()->default(0)->comment('更新时间'); + $table->json('request_data')->nullable()->comment('请求参数'); + $table->index(['created_time']); + $table->index(['user_id']); + $table->index(['is_public']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_login_logs'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182104_create_user_logs_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182104_create_user_logs_table.php new file mode 100644 index 0000000..fd34bc4 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182104_create_user_logs_table.php @@ -0,0 +1,46 @@ +engine = 'InnoDB'; + $table->bigIncrements('log_id')->unsigned()->comment('会员登录日志记录表'); + $table->bigInteger('user_id')->unsigned()->default(0)->comment('用户的id'); + $table->string('created_ip', 20)->default('')->comment('创建时的IP'); + $table->smallInteger('log_type')->default(0)->comment('日志类型【0.登陆;1.退出;2.签到;……】'); + $table->smallInteger('login_type')->default(0)->comment('登录类型【0.普通登录】'); + $table->boolean('is_public')->unsigned()->default(1)->comment('是否展示:1.展示;0.会员删除;2.管理员删除'); + $table->boolean('log_status')->unsigned()->default(1)->comment('状态:1.成功;0.失败'); + $table->integer('created_time')->unsigned()->default(0)->comment('创建时间'); + $table->integer('updated_time')->unsigned()->default(0)->comment('更新时间'); + $table->json('request_data')->nullable()->comment('请求参数'); + $table->string('description', 256)->default('')->comment('描述'); + $table->json('extend_json')->nullable()->comment('扩展信息'); + $table->index(['created_time']); + $table->index(['user_id']); + $table->index(['is_public']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_logs'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182120_create_user_grades_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182120_create_user_grades_table.php new file mode 100644 index 0000000..ab36cd9 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182120_create_user_grades_table.php @@ -0,0 +1,38 @@ +engine = 'InnoDB'; + $table->bigIncrements('grade_id')->unsigned()->comment('会员等级表【禁止删除,允许修改】'); + $table->string('grade_name', 256)->default('')->comment('等级名称'); + $table->string('min_value', 256)->default('')->comment('最小经验值'); + $table->string('max_value', 256)->default('')->comment('最大经验值'); + $table->integer('created_time')->unsigned()->default(0)->comment('创建时间'); + $table->integer('updated_time')->unsigned()->default(0)->comment('更新时间'); + $table->index(['created_time']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_grades'); + } +} diff --git a/app/Modules/Bbs/Database/Migrations/2021_02_05_182135_create_user_signs_table.php b/app/Modules/Bbs/Database/Migrations/2021_02_05_182135_create_user_signs_table.php new file mode 100644 index 0000000..e040b59 --- /dev/null +++ b/app/Modules/Bbs/Database/Migrations/2021_02_05_182135_create_user_signs_table.php @@ -0,0 +1,43 @@ +engine = 'InnoDB'; + $table->bigIncrements('sign_id')->unsigned()->comment('会员签到记录表'); + $table->bigInteger('user_id')->unsigned()->default(0)->comment('用户的id'); + $table->boolean('sign_type')->unsigned()->default(0)->comment('签到类型:0:会员签到;1:后台手动添加'); + $table->boolean('is_delete')->unsigned()->default(0)->comment('是否删除'); + $table->integer('created_time')->unsigned()->default(0)->comment('创建时间'); + $table->integer('updated_time')->unsigned()->default(0)->comment('更新时间'); + $table->string('description', 256)->default('')->comment('描述'); + $table->string('created_ip', 20)->default('')->comment('创建IP'); + $table->index(['created_time']); + $table->index(['sign_type']); + $table->index(['user_id']); + $table->index(['is_delete']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_signs'); + } +} -- Gitee From 50a80cacd71f6a5bb315599139a859d5ffb408a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B8=91=E8=B7=AF=E4=BA=BA?= <2278757482@qq.com> Date: Mon, 8 Feb 2021 16:24:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=99=BE=E5=BA=A6=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=8C=96?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/views/layouts/master.blade.php | 110 +----------------- blog-community.sql | 3 +- config/cnpscy.php | 20 ++-- public/statics/bbs/common.css | 105 +++++++++++++++++ 4 files changed, 121 insertions(+), 117 deletions(-) diff --git a/app/Modules/Bbs/Resources/views/layouts/master.blade.php b/app/Modules/Bbs/Resources/views/layouts/master.blade.php index ef94a10..59f4fab 100644 --- a/app/Modules/Bbs/Resources/views/layouts/master.blade.php +++ b/app/Modules/Bbs/Resources/views/layouts/master.blade.php @@ -26,13 +26,7 @@ - @yield('style-src') @yield('style') diff --git a/blog-community.sql b/blog-community.sql index c45151d..582cf51 100644 --- a/blog-community.sql +++ b/blog-community.sql @@ -925,7 +925,7 @@ CREATE TABLE `cnpscy_configs` ( `config_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '网站配置信息表', `config_title` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标题', `config_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '参数名称', - `config_value` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '参数值', + `config_value` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '参数值', `config_group` smallint(6) NOT NULL DEFAULT 0 COMMENT '分组', `config_extra` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '配置项', `config_type` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型:0.字符串;1.数字;2.文本;3.select下拉框;4.图片;5.富文本', @@ -992,6 +992,7 @@ INSERT INTO `cnpscy_configs` VALUES (44, 'SMTP[用户名]', 'mail_smtp_user', '' INSERT INTO `cnpscy_configs` VALUES (45, 'SMTP[密码]', 'mail_smtp_pass', '', 0, '', 0, 0, '', 1, 1586483569, 1586483569, 1); INSERT INTO `cnpscy_configs` VALUES (46, 'SMTP验证方式', 'mail_verify_type', '0:无1:TLS2:SSL', 0, '', 0, 0, '', 1, 1586483569, 1586483569, 1); INSERT INTO `cnpscy_configs` VALUES (47, '发件人邮箱', 'mail_from_email', '2278757482@qq.com', 0, '', 0, 0, '', 1, 1586483569, 1586483569, 1); +INSERT INTO `cnpscy_configs` VALUES (48, '百度统计代码', 'baidu_statistics', 'var _hmt = _hmt || [];\n (function() {\n var hm = document.createElement(\"script\");\n hm.src = \"https://hm.baidu.com/hm.js?dc25f837a6f07531a995939182324371\";\n var s = document.getElementsByTagName(\"script\")[0];\n s.parentNode.insertBefore(hm, s);\n })();', 1, '', 1, 0, '', 1, 0, 1612772484, 0); -- ---------------------------- -- Table structure for cnpscy_dynamics diff --git a/config/cnpscy.php b/config/cnpscy.php index 82046fc..cd565ce 100644 --- a/config/cnpscy.php +++ b/config/cnpscy.php @@ -3,12 +3,12 @@ 'site_web_author' => '小丑路人', 'site_web_keywords' => '小丑路人,小丑,路人,小丑疯狂吧,小丑博客,博客,laravel,yii,mysql', 'site_web_description' => '小丑路人,小丑,路人,小丑疯狂吧,小丑博客,博客,laravel,yii,mysql', - 'site_web_site_icp' => '晋ICP备18007574号-1', + 'site_web_site_icp' => '晋ICP备18007574号', 'site_web_logo' => '/statics/blog.jpg', 'resource_version_number' => '20200410', 'ARTICLE_CACHE_TIME' => '60', 'WEB_SITE_CLOSE' => '1', - 'config_group_list' => + 'config_group_list' => array ( 0 => '不分组', 1 => '基本', @@ -22,7 +22,7 @@ 9 => '小丑社区配置', 10 => '数据库', ), - 'config_type_list' => + 'config_type_list' => array ( 0 => '字符串', 1 => '文本', @@ -46,18 +46,17 @@ 'web_admin_title' => '小丑路人博客后台管理', 'web_admin_keywords' => '小丑路人博客后台', 'web_admin_description' => '小丑路人博客后台', - 'menu_type_list' => + 'menu_type_list' => array ( 0 => '作为频道页,不可作为栏目发布文章', 1 => '不直接发布内容,用于跳转页面', 2 => '作为发布栏目,文章列表模式', 3 => '单页面模式,例如企业简介', ), - 'admin_prefix' => 'admin', + 'admin_prefix' => 'cnpscy_blog_admin', 'privateKey' => '<<<EOD-----BEGIN RSA PRIVATE KEY-----MIICXAIBAAKBgQC8kGa1pSjbSYZVebtTRBLxBz5H4i2p/llLCrEeQhta5kaQu/RnvuER4W8oDH3+3iuIYW4VQAzyqFpwuzjkDI+17t5t0tyazyZ8JXw+KgXTxldMPEL95+qVhgXvwtihXC1c5oGbRlEDvDF6Sa53rcFVsYJ4ehde/zUxo6UvS7UrBQIDAQABAoGAb/MXV46XxCFRx', 'publicKey' => '<<<EOD-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8kGa1pSjbSYZVebtTRBLxBz5H4i2p/llLCrEeQhta5kaQu/RnvuER4W8oDH3+3iuIYW4VQAzyqFpwuzjkDI+17t5t0tyazyZ8JXw+KgXTxldMPEL95+qVhgXvwtihXC1c5oGbRlEDvDF6Sa53rcFVsYJ4ehde/zUxo6UvS7UrBQIDAQ', 'jwt_leeway' => '60', - 'start_api_logs' => '1', 'start_admin_operation_logs' => '1', 'start_web_logs' => '1', 'admin_default_pass' => '123456', @@ -65,4 +64,11 @@ 'cnpscy_version_number' => 'v1.0', 'system_timezone' => 'Asia/Shanghai', 'forbiddenip' => '', -); + 'baidu_statistics' => 'var _hmt = _hmt || []; + (function() { + var hm = document.createElement("script"); + hm.src = "https://hm.baidu.com/hm.js?dc25f837a6f07531a995939182324371"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); + })();', +); \ No newline at end of file diff --git a/public/statics/bbs/common.css b/public/statics/bbs/common.css index 345e63f..ec6d08c 100644 --- a/public/statics/bbs/common.css +++ b/public/statics/bbs/common.css @@ -27,3 +27,108 @@ .margin-left-50-px{ margin-left: 50px!important; } + + + + +/* 页面的样式 */ +.sidebar.fixed { + position: fixed; + left: 50%; + bottom: 0; + margin-left: 230px; +} + +.sidebar.pins { + position: absolute; + left: 50%; + margin-left: 230px; + right: 386px +} + +.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .dropdown > a:focus, .navbar-default .navbar-nav > .dropdown > a:hover, .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { + color: #45B6F7; + background-color: transparent +} + +.btn-info { + background-color: #45B6F7; + border-color: #45B6F7 +} + +.btn-info:hover { + background-color: #45B6F7; + border-color: #45B6F7 +} + +#post-box .post-title, #post-box .post-title { + border-left: 5px solid #45B6F7 +} + +.panel_cms li a:hover, .posts-default-title h2 a:hover { + color: #45B6F7 +} + +.pagination ul > .active > span { + background: #45B6F7; + color: #fff +} + +.related-posts > li .related-posts-panel:hover { + border-color: #45B6F7; + box-shadow: 0 0 2px #45B6F7; + -moz-box-shadow: 0 0 2px #45B6F7 +} + +.context img:hover { + border-color: #45B6F7; + box-shadow: 0 0 2px #45B6F7; + -moz-box-shadow: 0 0 2px #45B6F7 +} + +.context a { + border-bottom: 1px solid #45B6F7 +} + +.grid-weibo-show .u-btn-submit { + border: 1px solid #45B6F7; + background: #45B6F7 +} + +.link-li > a:hover, .sidebar-posts-list > li .side-title-r > a:hover, .sidebar-posts-list > li .side-title > a:hover, .sidebar-posts-list > li > a:hover, .author a:hover, .pagination > li > a, .pagination > li > span, .page-navi .current, .page-navi .pages, .page-navi a, .comments-list li .right-box > .comment-meta .edit-link a, .comments-list li .right-box > .comment-meta .reply a, .comments-list li .right-box > .waiting, .tw li:hover .tw-content, .page-tw a, ul.readers-list a:hover em, ul.readers-list a:hover strong, .posts-gallery-content h2 a:hover { + color: #45B6F7 +} + +.focusmo a:hover h4 { + background-color: #45B6F7; + opacity: .8 +} + +.backtop:hover { + background: #45B6F7; + border: 1px solid #45B6F7; + color: #fff +} + +.comments-list-nav span, .tw li:hover .atitle:after { + background: #45B6F7 +} + +.page-navi .current, .page-navi a:hover { + background: #45B6F7; + border-color: #45B6F7; + color: #FFF +} + +.page-tw span, .page-tw a:focus, .page-tw a:hover, ul.readers-list img:hover { + background-color: #45B6F7 +} + +::-webkit-scrollbar-thumb { + background-color: #45B6F7 +} + +.logtop dl p .spbut:hover { + border: 1px solid #45B6F7; + background-color: #45B6F7 +} -- Gitee