From f011c3ba7ba6d58f478d72bdb4b4a5e542ca507b Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 12 Oct 2026 12:59:14 +0000 Subject: [PATCH] =?UTF-8?q?feat(notice):=20=E9=80=9A=E7=9F=A5=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E4=B8=8E=E9=85=8D=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E5=8F=8A=E5=AF=B9=E9=BD=90=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0261012000003_notice_menu_config_align.php | 37 ++++++ .../service/adminInitData/SystemConfig.php | 119 ++++++++++++++++++ .../service/adminInitData/SystemMenu.php | 12 ++ 3 files changed, 168 insertions(+) create mode 100644 database/migrations/20261012000003_notice_menu_config_align.php diff --git a/database/migrations/20261012000003_notice_menu_config_align.php b/database/migrations/20261012000003_notice_menu_config_align.php new file mode 100644 index 0000000..b9a593c --- /dev/null +++ b/database/migrations/20261012000003_notice_menu_config_align.php @@ -0,0 +1,37 @@ +align('SystemMenu'); + + (new InitDataAlignService(new Output()))->align(); + } + + public function down() + { + // 有意留空:见类注释 down 说明 + } +} diff --git a/extend/base/admin/service/adminInitData/SystemConfig.php b/extend/base/admin/service/adminInitData/SystemConfig.php index cd1d6a5..d213e1a 100644 --- a/extend/base/admin/service/adminInitData/SystemConfig.php +++ b/extend/base/admin/service/adminInitData/SystemConfig.php @@ -374,6 +374,125 @@ $ul_system_config = array( "value" => "1", "remark" => "是否排除静态资源访问(0=不排除,1=排除 /css/.js/.png 等扩展名)", "sort" => 0, + ), + array( + "name" => "notify_inmail_enable", + "group" => "notify", + "value" => "1", + "remark" => "站内信通知渠道全局总闸(1=开启,0=关闭,键缺失视为开启)", + "sort" => 0, + ), + array( + "name" => "notify_login_scene_enable", + "group" => "notify", + "value" => "0", + "remark" => "管理员登录成功提醒通知(1=开启,0=关闭,默认关闭)", + "sort" => 0, + ), + array( + "name" => "notify_email_enable", + "group" => "notify", + "value" => "0", + "remark" => "邮件通知渠道总开关(1=开启,0=关闭,开启前需配置SMTP)", + "sort" => 0, + ), + array( + "name" => "notify_smtp_host", + "group" => "notify", + "value" => "", + "remark" => "SMTP服务器地址", + "sort" => 0, + ), + array( + "name" => "notify_smtp_port", + "group" => "notify", + "value" => "", + "remark" => "SMTP端口(SSL 465/TLS 587/无加密 25)", + "sort" => 0, + ), + array( + "name" => "notify_smtp_secure", + "group" => "notify", + "value" => "none", + "remark" => "SMTP加密方式(none=无加密,ssl,tls)", + "sort" => 0, + ), + array( + "name" => "notify_smtp_user", + "group" => "notify", + "value" => "", + "remark" => "SMTP登录账号(留空则不认证)", + "sort" => 0, + ), + array( + "name" => "notify_smtp_pass", + "group" => "notify", + "value" => "", + "remark" => "SMTP登录密码或授权码", + "sort" => 0, + ), + array( + "name" => "notify_smtp_from", + "group" => "notify", + "value" => "", + "remark" => "发件邮箱地址(缺省notice@localhost,真实发送需合法地址)", + "sort" => 0, + ), + array( + "name" => "notify_smtp_from_name", + "group" => "notify", + "value" => "", + "remark" => "邮件发件人名称", + "sort" => 0, + ), + array( + "name" => "notify_sms_enable", + "group" => "notify", + "value" => "0", + "remark" => "短信通知开关(1=开启,0=关闭,扩展占位待对接)", + "sort" => 0, + ), + array( + "name" => "notify_sms_sign", + "group" => "notify", + "value" => "", + "remark" => "短信签名(服务商审核通过)", + "sort" => 0, + ), + array( + "name" => "notify_sms_appid", + "group" => "notify", + "value" => "", + "remark" => "短信服务商应用ID", + "sort" => 0, + ), + array( + "name" => "notify_sms_secret", + "group" => "notify", + "value" => "", + "remark" => "短信服务商密钥", + "sort" => 0, + ), + array( + "name" => "notify_wechat_enable", + "group" => "notify", + "value" => "0", + "remark" => "公众号模板消息通知开关(1=开启,0=关闭,扩展占位待对接)", + "sort" => 0, + ), + array( + "name" => "notify_wechat_appid", + "group" => "notify", + "value" => "", + "remark" => "微信公众号应用ID", + "sort" => 0, + ), + array( + "name" => "notify_wechat_secret", + "group" => "notify", + "value" => "", + "remark" => "微信公众号应用密钥", + "sort" => 0, ) ); return $ul_system_config; diff --git a/extend/base/admin/service/adminInitData/SystemMenu.php b/extend/base/admin/service/adminInitData/SystemMenu.php index 337abdc..42a364d 100644 --- a/extend/base/admin/service/adminInitData/SystemMenu.php +++ b/extend/base/admin/service/adminInitData/SystemMenu.php @@ -323,6 +323,18 @@ $ul_system_menu = array( "sort" => 3, "status" => 1, ), + array( + "id" => 315, + "pid" => 228, + "title" => "通知管理", + "icon" => "fa fa-bell-o", + "href" => "system.notice/index", + "params" => "", + "target" => "_self", + "auth_node" => "system.notice/index", + "sort" => 0, + "status" => 1, + ), );