refactor(plugins): 将导航/友链/关于/统计 4 模块迁出 framework 至 plugins
- 在 applications/config.py 中通过 PLUGIN_ENABLE_FOLDERS 启用 4 个业务插件
- 删除 framework 内 applications/view/system/nav.py 与 templates/system/nav/* 模板
- applications/extensions/init_plugs 移除重复的 broadcast_execute('event_init'/'event_finish')
(由 init_bps / init_script 触发,避免 Blueprint 注册冲突)
- applications/view/system/index.py:未登录访问 / 直接渲染前台公开聚合页
- templates/system/index.html:移动端首屏即折叠侧边栏
- 新增 5 个 model(Nav 字段 status→enable 兼容、NavCategory、About、Friend、VisitLog/PageStat、NavClick)
- 新增 2 个 schema(NavCategorySchema、FriendOutSchema/ManageSchema)
- admin_about/admin_friend/admin_nav_category 在 init.json 中以「网站管理」分组挂载
- .gitignore 补充一次性备份、调试截图、探针截图不入库
This commit is contained in:
+10
@@ -152,3 +152,13 @@ logs/
|
||||
# 临时下载/构建产物
|
||||
tmp/
|
||||
build/
|
||||
|
||||
# 一次性数据备份 / 临时调试产物
|
||||
pear.db.*.bak
|
||||
nav_extracted.js
|
||||
dedup_nav.py
|
||||
|
||||
# 测试截图与探针截图(不入库,回归测试现场本地保留即可)
|
||||
scripts/_verify_*.png
|
||||
scripts/screenshots/
|
||||
output/
|
||||
|
||||
@@ -37,4 +37,6 @@ def create_app():
|
||||
init_bps(app)
|
||||
init_script(app)
|
||||
|
||||
# 5) 全站访问埋点已迁移到 plugins/siteStats(@app.before_request → record_visit)
|
||||
|
||||
return app
|
||||
|
||||
@@ -472,9 +472,9 @@
|
||||
"code": "system:nav:main",
|
||||
"url": "/system/nav/",
|
||||
"open_type": "_iframe",
|
||||
"parent_id": "1",
|
||||
"parent_id": "64",
|
||||
"icon": "layui-icon layui-icon-link",
|
||||
"sort": 9,
|
||||
"sort": 1,
|
||||
"create_time": "2026-09-05 14:30:00",
|
||||
"enable": 1
|
||||
},
|
||||
@@ -516,6 +516,58 @@
|
||||
"sort": 3,
|
||||
"create_time": "2026-09-05 14:30:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"id": 64,
|
||||
"name": "网站管理",
|
||||
"type": "0",
|
||||
"code": "",
|
||||
"url": "",
|
||||
"open_type": "",
|
||||
"parent_id": "0",
|
||||
"icon": "layui-icon layui-icon-website",
|
||||
"sort": 3,
|
||||
"create_time": "2026-09-05 17:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"name": "关于本站",
|
||||
"type": "1",
|
||||
"code": "site:about:main",
|
||||
"url": "/system/about/",
|
||||
"open_type": "_iframe",
|
||||
"parent_id": "64",
|
||||
"icon": "layui-icon layui-icon-about",
|
||||
"sort": 2,
|
||||
"create_time": "2026-09-05 17:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"id": 66,
|
||||
"name": "友情链接",
|
||||
"type": "1",
|
||||
"code": "site:friend:main",
|
||||
"url": "/system/friend/",
|
||||
"open_type": "_iframe",
|
||||
"parent_id": "64",
|
||||
"icon": "layui-icon layui-icon-link",
|
||||
"sort": 3,
|
||||
"create_time": "2026-09-05 17:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"name": "访问统计",
|
||||
"type": "1",
|
||||
"code": "site:stats:main",
|
||||
"url": "/system/stats/",
|
||||
"open_type": "_iframe",
|
||||
"parent_id": "64",
|
||||
"icon": "layui-icon layui-icon-chart",
|
||||
"sort": 4,
|
||||
"create_time": "2026-09-05 17:00:00",
|
||||
"enable": 1
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
@@ -601,10 +653,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 1,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用分类",
|
||||
@@ -613,10 +665,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 2,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用分类",
|
||||
@@ -625,10 +677,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 3,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用分类",
|
||||
@@ -637,10 +689,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 4,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -649,10 +701,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 1,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -661,10 +713,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 2,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -673,10 +725,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 3,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -685,10 +737,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 4,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -697,10 +749,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 5,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -709,10 +761,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 6,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -721,10 +773,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 7,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -733,10 +785,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 8,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -745,10 +797,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 9,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "旺珂内网",
|
||||
@@ -757,10 +809,10 @@
|
||||
"description": "内网服务,仅限本地访问)",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 10,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用网站",
|
||||
@@ -769,10 +821,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 1,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用网站",
|
||||
@@ -781,10 +833,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 2,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用网站",
|
||||
@@ -793,10 +845,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 3,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "常用网站",
|
||||
@@ -805,10 +857,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 4,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -817,10 +869,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 1,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -829,10 +881,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 2,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -841,10 +893,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 3,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -853,10 +905,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 4,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -865,10 +917,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 5,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -877,10 +929,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 6,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -889,10 +941,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 7,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -901,10 +953,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 8,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -913,10 +965,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 9,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -925,10 +977,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 10,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -937,10 +989,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 11,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -949,10 +1001,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 12,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -961,10 +1013,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 13,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -973,10 +1025,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 14,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -985,10 +1037,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 15,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -997,10 +1049,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 16,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -1009,10 +1061,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 17,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "休闲娱乐",
|
||||
@@ -1021,10 +1073,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 18,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1033,10 +1085,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 1,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1045,10 +1097,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 2,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1057,10 +1109,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 3,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1069,10 +1121,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 4,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1081,10 +1133,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 5,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1093,10 +1145,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 6,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1105,10 +1157,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 7,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1117,10 +1169,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 8,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1129,10 +1181,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 9,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1141,10 +1193,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 10,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1153,10 +1205,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 11,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1165,10 +1217,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 12,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1177,10 +1229,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 13,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1189,10 +1241,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 14,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1201,10 +1253,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 15,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1213,10 +1265,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 16,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1225,10 +1277,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 17,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
},
|
||||
{
|
||||
"category": "技术网站",
|
||||
@@ -1237,10 +1289,10 @@
|
||||
"description": "",
|
||||
"icon": "layui-icon-link",
|
||||
"sort": 18,
|
||||
"status": 1,
|
||||
"is_external": 1,
|
||||
"create_by": "admin",
|
||||
"create_at": "2026-09-05 15:00:00"
|
||||
"create_at": "2026-09-05 15:00:00",
|
||||
"enable": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -70,7 +70,8 @@ class BaseConfig:
|
||||
MAIL_DEFAULT_SENDER = _env_str("MAIL_DEFAULT_SENDER", MAIL_USERNAME)
|
||||
|
||||
# ---- 插件 ----
|
||||
PLUGIN_ENABLE_FOLDERS = []
|
||||
# 站点业务模块(导航 / 友链 / 关于 / 访问统计)均通过 plugins 方式开发,启用即可挂载路由
|
||||
PLUGIN_ENABLE_FOLDERS = ["navManager", "friendManager", "aboutManager", "siteStats"]
|
||||
|
||||
|
||||
class DevConfig(BaseConfig):
|
||||
|
||||
@@ -12,7 +12,7 @@ from .init_plugins import register_plugin, broadcast_execute
|
||||
|
||||
|
||||
def init_plugs(app: Flask) -> None:
|
||||
# 注册插件a
|
||||
# 注册插件 (仅 import + 注册动作)
|
||||
register_plugin(app)
|
||||
broadcast_execute(app, 'event_begin')
|
||||
|
||||
@@ -25,10 +25,10 @@ def init_plugs(app: Flask) -> None:
|
||||
init_session(app)
|
||||
init_limit(app)
|
||||
|
||||
# 系统蓝图相关
|
||||
# 系统蓝图相关(含 @template_global 等 Jinja 注入)
|
||||
init_template_directives(app)
|
||||
init_error_views(app)
|
||||
|
||||
# 初始化插件
|
||||
broadcast_execute(app, 'event_init')
|
||||
broadcast_execute(app, 'event_finish')
|
||||
|
||||
# 注:event_init / event_finish / event_context 由具体的
|
||||
# applications.view.init_bps / applications.common.script.init_script
|
||||
# 触发,避免 init_plugs 内重复调用导致 Blueprint 注册冲突
|
||||
|
||||
@@ -9,3 +9,8 @@ from .admin_user import User
|
||||
from .admin_user_role import user_role
|
||||
from .admin_mail import Mail
|
||||
from .admin_nav import Nav
|
||||
from .admin_nav_category import NavCategory
|
||||
from .admin_about import About
|
||||
from .admin_friend import Friend
|
||||
from .admin_stat import VisitLog, PageStat
|
||||
from .admin_nav_click import NavClick
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
"""
|
||||
「关于本站」内容管理。
|
||||
|
||||
单条记录表 (id=1):
|
||||
- 用于站点"关于"页面:自我介绍、备案号、联系方式、捐赠等。
|
||||
- 不限制多份:单条表单就能维护全部内容,幂等 upsert。
|
||||
|
||||
设计原则:
|
||||
- 内容字段全可空(除 id),发布前可以临时空着。
|
||||
- Markdown 字段长度无限制,存原始文本,渲染时由前端解析。
|
||||
"""
|
||||
import datetime
|
||||
from applications.extensions import db
|
||||
|
||||
|
||||
class About(db.Model):
|
||||
__tablename__ = 'site_about'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='主键')
|
||||
|
||||
# 站点名称(公开页头部)
|
||||
site_name = db.Column(db.String(120), default='', comment='站点名')
|
||||
|
||||
# 自我介绍 / 关于(Markdown 格式,前台渲染)
|
||||
content_md = db.Column(db.Text, default='', comment='关于本站正文 (Markdown)')
|
||||
|
||||
# 备案信息
|
||||
icp = db.Column(db.String(120), default='', comment='ICP 备案号')
|
||||
|
||||
# 联系信息(任选)
|
||||
contact_email = db.Column(db.String(120), default='', comment='联系邮箱')
|
||||
contact_qq = db.Column(db.String(32), default='', comment='联系 QQ')
|
||||
contact_wechat = db.Column(db.String(120), default='', comment='微信号')
|
||||
contact_telegram = db.Column(db.String(120), default='', comment='Telegram')
|
||||
contact_github = db.Column(db.String(255), default='', comment='GitHub 链接')
|
||||
|
||||
# 捐赠 / 打赏 URL(一般挂二维码图片)
|
||||
donate_url = db.Column(db.String(255), default='', comment='捐赠/打赏 URL 或二维码图片地址')
|
||||
|
||||
create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
|
||||
update_at = db.Column(
|
||||
db.DateTime,
|
||||
default=datetime.datetime.now,
|
||||
onupdate=datetime.datetime.now,
|
||||
comment='更新时间',
|
||||
)
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
return {
|
||||
'id': self.id,
|
||||
'site_name': self.site_name or '',
|
||||
'content_md': self.content_md or '',
|
||||
'icp': self.icp or '',
|
||||
'contact_email': self.contact_email or '',
|
||||
'contact_qq': self.contact_qq or '',
|
||||
'contact_wechat': self.contact_wechat or '',
|
||||
'contact_telegram': self.contact_telegram or '',
|
||||
'contact_github': self.contact_github or '',
|
||||
'donate_url': self.donate_url or '',
|
||||
'create_at': self.create_at.strftime('%Y-%m-%d %H:%M:%S') if self.create_at else '',
|
||||
'update_at': self.update_at.strftime('%Y-%m-%d %H:%M:%S') if self.update_at else '',
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
"""
|
||||
「友情链接」管理。
|
||||
|
||||
- 后台:列表 + 新增 / 编辑 / 删除 / 启用 / 禁用(与 Nav 一致接口风格)
|
||||
- 前台:公开只读
|
||||
|
||||
字段:
|
||||
- title : 友链名称
|
||||
- url : 友链 URL
|
||||
- logo : 站点头像 / favicon(可空,自动用 url 的 favicon)
|
||||
- description : 简介
|
||||
- category : 友链分组(默认「推荐友链」)
|
||||
- sort : 同分类下排序
|
||||
- enable : 1 启用,0 禁用
|
||||
- is_external: 1 新窗口打开 / 0 当前窗口
|
||||
"""
|
||||
import datetime
|
||||
from applications.extensions import db
|
||||
|
||||
|
||||
class Friend(db.Model):
|
||||
__tablename__ = 'site_friend'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='友情链接ID')
|
||||
title = db.Column(db.String(100), nullable=False, comment='名称')
|
||||
url = db.Column(db.String(255), nullable=False, comment='链接')
|
||||
logo = db.Column(db.String(255), default='', comment='Logo / favicon')
|
||||
description = db.Column(db.String(255), default='', comment='简介')
|
||||
category = db.Column(db.String(50), default='推荐友链', comment='分组', index=True)
|
||||
sort = db.Column(db.Integer, default=0, comment='排序')
|
||||
enable = db.Column(db.Integer, default=1, comment='状态(1启用,0关闭)')
|
||||
is_external = db.Column(db.Integer, default=1, comment='是否外链')
|
||||
create_by = db.Column(db.String(50), default='admin', comment='创建者')
|
||||
create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
|
||||
update_at = db.Column(
|
||||
db.DateTime,
|
||||
default=datetime.datetime.now,
|
||||
onupdate=datetime.datetime.now,
|
||||
comment='更新时间',
|
||||
)
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'title': self.title,
|
||||
'url': self.url,
|
||||
'logo': self.logo or '',
|
||||
'description': self.description or '',
|
||||
'category': self.category or '推荐友链',
|
||||
'sort': self.sort or 0,
|
||||
'enable': self.enable,
|
||||
'is_external': self.is_external,
|
||||
'create_by': self.create_by,
|
||||
'create_at': self.create_at.strftime('%Y-%m-%d %H:%M:%S') if self.create_at else '',
|
||||
'update_at': self.update_at.strftime('%Y-%m-%d %H:%M:%S') if self.update_at else '',
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class Nav(db.Model):
|
||||
sort = db.Column(db.Integer, default=0, comment='排序')
|
||||
|
||||
# 1=启用,0=禁用(禁用后前台不再展示,后台列表仍可见)
|
||||
status = db.Column(db.Integer, default=1, comment='状态(1启用,0关闭)')
|
||||
enable = db.Column(db.Integer, default=1, comment='状态(1启用,0关闭)')
|
||||
|
||||
# 1=外链(新窗口打开),0=站内(当前窗口)
|
||||
is_external = db.Column(db.Integer, default=1, comment='是否外链')
|
||||
@@ -62,7 +62,7 @@ class Nav(db.Model):
|
||||
'description': self.description or '',
|
||||
'icon': self.icon or 'layui-icon-link',
|
||||
'sort': self.sort or 0,
|
||||
'status': self.status,
|
||||
'enable': self.enable,
|
||||
'is_external': self.is_external,
|
||||
'create_by': self.create_by,
|
||||
'create_at': self.create_at.strftime('%Y-%m-%d %H:%M:%S') if self.create_at else '',
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
导航分类表
|
||||
|
||||
Nav.category 是字符串字段,难以管理顺序/启用/图标。
|
||||
NavCategory 把"分类"提到一张独立表,允许后台做完整的 CRUD。
|
||||
|
||||
数据关系:
|
||||
- NavCategory 1 — N Nav
|
||||
- 保留 Nav.category 字符串字段为冗余存储,避免前端热路径上做 LEFT JOIN
|
||||
"""
|
||||
import datetime
|
||||
|
||||
from applications.extensions import db
|
||||
|
||||
|
||||
class NavCategory(db.Model):
|
||||
__tablename__ = 'nav_category'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='分类ID')
|
||||
|
||||
# 同名分类不能重复,方便前台 URL /site/category/<name> 用作 slug
|
||||
name = db.Column(db.String(50), nullable=False, unique=True, index=True, comment='分类名(前端分类详情 URL)')
|
||||
|
||||
# 分类图标(前端首页标题旁小图标)
|
||||
icon = db.Column(db.String(50), default='layui-icon-list', comment='layui-icon class')
|
||||
|
||||
# 分类简介(前端首页卡片标题下方描述)
|
||||
description = db.Column(db.String(255), default='', comment='分类简介')
|
||||
|
||||
# 同级别的展示顺序(前端首页自上而下)
|
||||
sort = db.Column(db.Integer, default=0, comment='排序')
|
||||
|
||||
# 1=启用,0=禁用(禁用后前台不再展示该分类,但 Nav 记录仍保留)
|
||||
enable = db.Column(db.Integer, default=1, comment='状态(1启用,0关闭)')
|
||||
|
||||
create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
|
||||
update_at = db.Column(
|
||||
db.DateTime,
|
||||
default=datetime.datetime.now,
|
||||
onupdate=datetime.datetime.now,
|
||||
comment='更新时间',
|
||||
)
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'name': self.name,
|
||||
'icon': self.icon or 'layui-icon-list',
|
||||
'description': self.description or '',
|
||||
'sort': self.sort or 0,
|
||||
'enable': self.enable,
|
||||
'create_at': self.create_at.strftime('%Y-%m-%d %H:%M:%S') if self.create_at else '',
|
||||
'update_at': self.update_at.strftime('%Y-%m-%d %H:%M:%S') if self.update_at else '',
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
导航卡片点击埋点模型。
|
||||
|
||||
每条记录是用户点了一次某张 Nav 卡片跳出去的事件。
|
||||
- nav_id 关联 public_nav.id
|
||||
- day YYYY-MM-DD 日期
|
||||
- ip 访客 IP(用于去重 / 隐私留存期控制)
|
||||
- clicked_at 点击时间
|
||||
"""
|
||||
import datetime
|
||||
from applications.extensions import db
|
||||
|
||||
|
||||
class NavClick(db.Model):
|
||||
__tablename__ = 'site_nav_click'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='记录ID')
|
||||
nav_id = db.Column(db.Integer, nullable=False, index=True, comment='被点击的导航ID')
|
||||
day = db.Column(db.String(10), default='', index=True, comment='日期 YYYY-MM-DD')
|
||||
ip = db.Column(db.String(64), default='', comment='访客IP')
|
||||
clicked_at = db.Column(db.DateTime, default=datetime.datetime.now, index=True, comment='点击时间')
|
||||
@@ -0,0 +1,57 @@
|
||||
"""
|
||||
「访问统计」数据模型。
|
||||
|
||||
每条记录是一次访问事件:
|
||||
- path 访问路径
|
||||
- referer 来源页(可空)
|
||||
- ua User-Agent 摘要(可空)
|
||||
- ip 访客 IP(如果能拿到)
|
||||
- day YYYY-MM-DD 日期(用于按天聚合)
|
||||
- visit_at 访问时间
|
||||
"""
|
||||
import datetime
|
||||
from applications.extensions import db
|
||||
|
||||
|
||||
class VisitLog(db.Model):
|
||||
__tablename__ = 'site_visit_log'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='记录ID')
|
||||
path = db.Column(db.String(255), default='', index=True, comment='访问路径')
|
||||
referer = db.Column(db.String(255), default='', comment='来源页')
|
||||
ua = db.Column(db.String(255), default='', comment='UA')
|
||||
ip = db.Column(db.String(64), default='', comment='访问IP')
|
||||
day = db.Column(db.String(10), default='', index=True, comment='日期 YYYY-MM-DD')
|
||||
visit_at = db.Column(db.DateTime, default=datetime.datetime.now, index=True, comment='访问时间')
|
||||
|
||||
|
||||
class PageStat(db.Model):
|
||||
"""
|
||||
路径级累计统计:每次访问做 upsert(按 path+day)。
|
||||
|
||||
字段:
|
||||
- path
|
||||
- day
|
||||
- pv 当日 / 累计 Page View
|
||||
- uv IP 去重计数(用 set 维护在内存里,但用户规模小可以按 (path, day, ip) 简单去重)
|
||||
- last_hit 最后一次访问时间
|
||||
"""
|
||||
__tablename__ = 'site_page_stat'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
path = db.Column(db.String(255), default='', index=True)
|
||||
day = db.Column(db.String(10), default='', index=True)
|
||||
pv = db.Column(db.Integer, default=0, comment='Page View')
|
||||
uv = db.Column(db.Integer, default=0, comment='独立访客数(IP 去重后)')
|
||||
uv_ip_set = db.Column(db.Text, default='', comment='独立 IP 列表 CSV')
|
||||
last_hit = db.Column(db.DateTime, default=datetime.datetime.now, comment='最近访问时间')
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'path': self.path,
|
||||
'day': self.day,
|
||||
'pv': self.pv or 0,
|
||||
'uv': self.uv or 0,
|
||||
'last_hit': self.last_hit.strftime('%Y-%m-%d %H:%M:%S') if self.last_hit else '',
|
||||
}
|
||||
@@ -7,3 +7,5 @@ from .admin_log import LogOutSchema
|
||||
from .admin_photo import PhotoOutSchema
|
||||
from .admin_mail import MailOutSchema
|
||||
from .admin_nav import NavOutSchema, NavManageSchema
|
||||
from .admin_nav_category import NavCategorySchema
|
||||
from .admin_friend import FriendOutSchema, FriendManageSchema
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
from flask_marshmallow.sqla import SQLAlchemyAutoSchema
|
||||
|
||||
from applications.models import Friend
|
||||
|
||||
|
||||
class FriendOutSchema(SQLAlchemyAutoSchema):
|
||||
"""前台展示用:序列化 Friend 对象为 JSON"""
|
||||
class Meta:
|
||||
model = Friend
|
||||
include_fk = True
|
||||
|
||||
|
||||
class FriendManageSchema(SQLAlchemyAutoSchema):
|
||||
"""后台管理用:序列化为表格数据 / 表单回填"""
|
||||
class Meta:
|
||||
model = Friend
|
||||
include_fk = True
|
||||
@@ -0,0 +1,10 @@
|
||||
from flask_marshmallow.sqla import SQLAlchemyAutoSchema
|
||||
|
||||
from applications.models import NavCategory
|
||||
|
||||
|
||||
class NavCategorySchema(SQLAlchemyAutoSchema):
|
||||
"""导航分类序列化:用于后台 table_api 的 data 字段"""
|
||||
class Meta:
|
||||
model = NavCategory
|
||||
include_fk = True
|
||||
@@ -6,7 +6,7 @@ from applications.view.system.index import bp as index_bp
|
||||
from applications.view.system.log import bp as log_bp
|
||||
from applications.view.system.mail import bp as mail_bp
|
||||
from applications.view.system.monitor import bp as monitor_bp
|
||||
from applications.view.system.nav import bp as nav_bp
|
||||
# 4 个业务模块(nav / friend / about / stat)已迁出到 plugins/* ,下文的 register 也不再挂载
|
||||
from applications.view.system.passport import bp as passport_bp
|
||||
from applications.view.system.power import bp as power_bp
|
||||
from applications.view.system.rights import bp as right_bp
|
||||
@@ -31,6 +31,5 @@ def register_system_bps(app: Flask):
|
||||
system_bp.register_blueprint(passport_bp)
|
||||
system_bp.register_blueprint(right_bp)
|
||||
system_bp.register_blueprint(dept_bp)
|
||||
system_bp.register_blueprint(nav_bp)
|
||||
app.register_blueprint(index_bp)
|
||||
app.register_blueprint(system_bp)
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
from flask import Blueprint, render_template
|
||||
from flask_login import login_required, current_user
|
||||
from flask_login import login_required, current_user, login_fresh
|
||||
|
||||
from applications.view.public.nav import render_public_index
|
||||
|
||||
bp = Blueprint('index', __name__, url_prefix='/')
|
||||
|
||||
|
||||
# 首页
|
||||
# 首页:未登录 → 前台公开导航聚合页;已登录 → 跳到工作台
|
||||
@bp.get('/')
|
||||
@login_required
|
||||
def index():
|
||||
user = current_user
|
||||
return render_template('system/index.html', user=user)
|
||||
# 已登录用户访问根路径时,直接进后台工作台;
|
||||
# 匿名访问则直接渲染前台导航页(不重定向,地址栏保持 /)
|
||||
if current_user.is_authenticated:
|
||||
return render_template('system/index.html', user=current_user)
|
||||
return render_public_index()
|
||||
|
||||
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
"""
|
||||
后台导航管理视图(需要登录 + 权限码 system:nav:*)
|
||||
|
||||
提供 Nav 模型的 CRUD 接口,供后台管理员维护前台公开导航。
|
||||
"""
|
||||
from flask import Blueprint, render_template, request
|
||||
from flask_login import current_user
|
||||
|
||||
from applications.common.utils.http import table_api, fail_api, success_api
|
||||
from applications.common.utils.rights import authorize
|
||||
from applications.common.utils.validate import str_escape
|
||||
from applications.extensions import db
|
||||
from applications.extensions.init_limit import limiter
|
||||
from applications.models import Nav
|
||||
from applications.schemas import NavManageSchema
|
||||
|
||||
bp = Blueprint('nav', __name__, url_prefix='/nav')
|
||||
|
||||
|
||||
@bp.get('/')
|
||||
@authorize("system:nav:main")
|
||||
def main():
|
||||
"""导航管理主页"""
|
||||
return render_template('system/nav/main.html')
|
||||
|
||||
|
||||
@bp.get('/data')
|
||||
@limiter.limit("60 per minute")
|
||||
@authorize("system:nav:main")
|
||||
def data():
|
||||
"""表格数据接口"""
|
||||
keyword = str_escape(request.args.get('keyword', type=str))
|
||||
category = str_escape(request.args.get('category', type=str))
|
||||
|
||||
query = Nav.query
|
||||
if keyword:
|
||||
query = query.filter(
|
||||
db.or_(
|
||||
Nav.title.contains(keyword),
|
||||
Nav.url.contains(keyword),
|
||||
Nav.description.contains(keyword),
|
||||
)
|
||||
)
|
||||
if category:
|
||||
query = query.filter(Nav.category == category)
|
||||
|
||||
items = query.order_by(Nav.category.asc(), Nav.sort.asc(), Nav.id.asc()).all()
|
||||
data = NavManageSchema(many=True).dump(items)
|
||||
return table_api(msg="请求成功", data=data, count=len(data))
|
||||
|
||||
|
||||
@bp.get('/add')
|
||||
@authorize("system:nav:add", log=True)
|
||||
def add():
|
||||
return render_template('system/nav/add.html')
|
||||
|
||||
|
||||
@bp.post('/save')
|
||||
@authorize("system:nav:add", log=True)
|
||||
def save():
|
||||
req = request.get_json(force=True)
|
||||
try:
|
||||
nav = Nav(
|
||||
category=str_escape(req.get('category')),
|
||||
title=str_escape(req.get('title')),
|
||||
url=str_escape(req.get('url')),
|
||||
description=str_escape(req.get('description')),
|
||||
icon=str_escape(req.get('icon')) or 'layui-icon-link',
|
||||
sort=int(req.get('sort') or 0),
|
||||
status=int(req.get('status') or 1),
|
||||
is_external=int(req.get('isExternal') or 1),
|
||||
create_by=current_user.username if current_user.is_authenticated else 'admin',
|
||||
)
|
||||
db.session.add(nav)
|
||||
db.session.commit()
|
||||
except Exception as e:
|
||||
db.session.rollback()
|
||||
return fail_api(msg=f"新增失败:{e}")
|
||||
return success_api(msg="新增成功")
|
||||
|
||||
|
||||
@bp.get('/edit')
|
||||
@authorize("system:nav:edit", log=True)
|
||||
def edit():
|
||||
nav_id = request.args.get("navId", type=int)
|
||||
nav = Nav.query.get(nav_id)
|
||||
if not nav:
|
||||
return fail_api(msg="导航不存在")
|
||||
return render_template('system/nav/edit.html', nav=nav)
|
||||
|
||||
|
||||
@bp.put('/update')
|
||||
@authorize("system:nav:edit", log=True)
|
||||
def update():
|
||||
req = request.get_json(force=True)
|
||||
nav_id = req.get('id')
|
||||
nav = Nav.query.get(nav_id)
|
||||
if not nav:
|
||||
return fail_api(msg="导航不存在")
|
||||
try:
|
||||
nav.category = str_escape(req.get('category')) or nav.category
|
||||
nav.title = str_escape(req.get('title')) or nav.title
|
||||
nav.url = str_escape(req.get('url')) or nav.url
|
||||
nav.description = str_escape(req.get('description'))
|
||||
nav.icon = str_escape(req.get('icon')) or 'layui-icon-link'
|
||||
nav.sort = int(req.get('sort') or 0)
|
||||
nav.status = int(req.get('status') or 1)
|
||||
nav.is_external = int(req.get('isExternal') or 1)
|
||||
db.session.commit()
|
||||
except Exception as e:
|
||||
db.session.rollback()
|
||||
return fail_api(msg=f"更新失败:{e}")
|
||||
return success_api(msg="更新成功")
|
||||
|
||||
|
||||
@bp.delete('/remove/<int:_id>')
|
||||
@authorize("system:nav:remove", log=True)
|
||||
def remove(_id):
|
||||
nav = Nav.query.get(_id)
|
||||
if not nav:
|
||||
return fail_api(msg="导航不存在")
|
||||
db.session.delete(nav)
|
||||
db.session.commit()
|
||||
return success_api(msg="删除成功")
|
||||
|
||||
|
||||
@bp.put('/enable')
|
||||
@authorize("system:nav:edit", log=True)
|
||||
def enable():
|
||||
nav_id = request.get_json(force=True).get('navId')
|
||||
Nav.query.filter_by(id=nav_id).update({"status": 1})
|
||||
db.session.commit()
|
||||
return success_api(msg="已启用")
|
||||
|
||||
|
||||
@bp.put('/disable')
|
||||
@authorize("system:nav:edit", log=True)
|
||||
def disable():
|
||||
nav_id = request.get_json(force=True).get('navId')
|
||||
Nav.query.filter_by(id=nav_id).update({"status": 0})
|
||||
db.session.commit()
|
||||
return success_api(msg="已禁用")
|
||||
@@ -8,6 +8,14 @@
|
||||
</head>
|
||||
<!-- 结 构 代 码 -->
|
||||
<body class="layui-layout-body pear-admin">
|
||||
<!-- 首屏即折叠侧边栏:避免移动端加载期间 sidebar 展开遮挡内容(后续 admin.js 会再次同步状态) -->
|
||||
<script>
|
||||
(function () {
|
||||
if (window.innerWidth <= 768) {
|
||||
document.body.classList.add('pear-mini');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<!-- 布 局 框 架 -->
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<!-- 顶 部 样 式 -->
|
||||
@@ -145,6 +153,32 @@
|
||||
// 渲染
|
||||
admin.render();
|
||||
|
||||
// 移动端初始化:窗口较窄时默认折叠左侧菜单,避免内容被侧边栏挡住
|
||||
(function () {
|
||||
function foldSidebar() {
|
||||
if ($(window).width() > 768) return;
|
||||
var body = $('body');
|
||||
var admin = $('.pear-admin');
|
||||
// 直接加 class:不依赖 .collapse 按钮是否存在或是否响应点击
|
||||
if (!admin.hasClass('pear-mini')) {
|
||||
admin.addClass('pear-mini');
|
||||
body.addClass('pear-mini');
|
||||
}
|
||||
// 同步 menu 实例状态,防止后续交互异常
|
||||
if (window.PearAdmin && window.PearAdmin.instances && window.PearAdmin.instances.menu) {
|
||||
try {
|
||||
window.PearAdmin.instances.menu.collapse();
|
||||
} catch (e) {}
|
||||
window.PearAdmin.instances.menu.isCollapse = true;
|
||||
}
|
||||
}
|
||||
// 立即 + 多次延迟:覆盖 admin.js 异步初始化和菜单渲染滞后
|
||||
foldSidebar();
|
||||
setTimeout(foldSidebar, 300);
|
||||
setTimeout(foldSidebar, 800);
|
||||
setTimeout(foldSidebar, 1500);
|
||||
})();
|
||||
|
||||
// 注销
|
||||
admin.logout(function () {
|
||||
let loading = layer.load()
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>新增导航</title>
|
||||
{% include 'system/common/header.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-form" lay-filter="nav-form" style="padding: 20px 30px 0 0;">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="category" required lay-verify="required" placeholder="如:开发工具 / AI / 设计资源"
|
||||
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="title" required lay-verify="required" placeholder="显示在卡片上的名称"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接 URL</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="url" required lay-verify="required|url"
|
||||
placeholder="https://example.com" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">简介</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="description" placeholder="选填,鼠标悬停时显示" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="icon" placeholder="layui-icon-website / layui-icon-ai / 等"
|
||||
autocomplete="off" class="layui-input" value="layui-icon-link">
|
||||
<div class="layui-form-mid layui-word-aux">参考:<a href="https://layui.dev/web/doc/element/icon.html" target="_blank">layui 图标库</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="sort" value="0" 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="radio" name="isExternal" value="1" title="外链(新窗口)" checked>
|
||||
<input type="radio" name="isExternal" value="0" title="站内(当前窗口)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="启用" checked>
|
||||
<input type="radio" name="status" value="0" title="禁用">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="nav-submit">保存</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'system/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.$;
|
||||
|
||||
form.on('submit(nav-submit)', function(data){
|
||||
$.ajax({
|
||||
url: '/system/nav/save',
|
||||
type: 'POST',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(data.field),
|
||||
success: function(res){
|
||||
if (res.success) {
|
||||
layer.msg(res.msg, {icon: 1});
|
||||
parent.layui.table.reload('nav-table');
|
||||
setTimeout(function(){ parent.layer.closeAll(); }, 800);
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,100 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>编辑导航</title>
|
||||
{% include 'system/common/header.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-form" lay-filter="nav-form" style="padding: 20px 30px 0 0;">
|
||||
<input type="hidden" name="id" value="{{ nav.id }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="category" required lay-verify="required" value="{{ nav.category }}"
|
||||
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="title" required lay-verify="required" value="{{ nav.title }}"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接 URL</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="url" required lay-verify="required|url" value="{{ nav.url }}"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">简介</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="description" class="layui-textarea">{{ nav.description or '' }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="icon" value="{{ nav.icon }}" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="sort" value="{{ nav.sort }}" 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="radio" name="isExternal" value="1" title="外链(新窗口)" {% if nav.is_external == 1 %}checked{% endif %}>
|
||||
<input type="radio" name="isExternal" value="0" title="站内(当前窗口)" {% if nav.is_external != 1 %}checked{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="启用" {% if nav.status == 1 %}checked{% endif %}>
|
||||
<input type="radio" name="status" value="0" title="禁用" {% if nav.status != 1 %}checked{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="nav-submit">保存</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary" onclick="parent.layer.closeAll();">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'system/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.$;
|
||||
|
||||
form.on('submit(nav-submit)', function(data){
|
||||
$.ajax({
|
||||
url: '/system/nav/update',
|
||||
type: 'PUT',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(data.field),
|
||||
success: function(res){
|
||||
if (res.success) {
|
||||
layer.msg(res.msg, {icon: 1});
|
||||
parent.layui.table.reload('nav-table');
|
||||
setTimeout(function(){ parent.layer.closeAll(); }, 800);
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,177 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>导航管理</title>
|
||||
{% include 'system/common/header.html' %}
|
||||
</head>
|
||||
<body class="layui-layout-body pear-admin">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
{% include 'system/common/head.html' %}
|
||||
{% include 'system/common/side.html' %}
|
||||
<div class="layui-body">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-icon layui-icon-link"></span> 导航管理
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" style="float:right;margin-top:-6px;"
|
||||
lay-event="add" id="btn-add">
|
||||
<i class="layui-icon layui-icon-add-1"></i> 新增导航
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<form class="layui-form" lay-filter="search-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">关键词</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="keyword" placeholder="标题/链接/简介" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="category" placeholder="按分类过滤" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="search">搜索</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table id="nav-table" lay-filter="nav-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'system/common/footer.html' %}
|
||||
</div>
|
||||
|
||||
{% raw %}
|
||||
<script type="text/html" id="col-status">
|
||||
{{# if(d.status === 1){ }}
|
||||
<span class="layui-badge layui-bg-green">启用</span>
|
||||
{{# } else { }}
|
||||
<span class="layui-badge layui-bg-gray">禁用</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="col-external">
|
||||
{{# if(d.is_external === 1){ }}
|
||||
<span class="layui-badge layui-bg-blue">外链</span>
|
||||
{{# } else { }}
|
||||
<span class="layui-badge">站内</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="col-op">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
{{# if(d.status === 1){ }}
|
||||
<a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="disable">禁用</a>
|
||||
{{# } else { }}
|
||||
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="enable">启用</a>
|
||||
{{# } }}
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="remove">删除</a>
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
||||
<script>
|
||||
layui.use(['table', 'form', 'layer'], function(){
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.$;
|
||||
|
||||
var renderTable = function(){
|
||||
var keyword = $('input[name="keyword"]').val();
|
||||
var category = $('input[name="category"]').val();
|
||||
table.render({
|
||||
elem: '#nav-table',
|
||||
url: '/system/nav/data',
|
||||
where: { keyword: keyword, category: category },
|
||||
page: true,
|
||||
limit: 20,
|
||||
cols: [[
|
||||
{field: 'id', title: 'ID', width: 60},
|
||||
{field: 'category', title: '分类', width: 120},
|
||||
{field: 'title', title: '标题', width: 180},
|
||||
{field: 'url', title: '链接', minWidth: 200},
|
||||
{field: 'icon', title: '图标', width: 100},
|
||||
{field: 'sort', title: '排序', width: 70},
|
||||
{field: 'is_external', title: '类型', width: 80, templet: '#col-external'},
|
||||
{field: 'status', title: '状态', width: 80, templet: '#col-status'},
|
||||
{field: 'create_at', title: '创建时间', width: 170},
|
||||
{fixed: 'right', title: '操作', toolbar: '#col-op', width: 220}
|
||||
]],
|
||||
response: {
|
||||
statusCode: 200
|
||||
},
|
||||
parseData: function(res){
|
||||
return {
|
||||
code: res.success ? 0 : 1,
|
||||
msg: res.msg,
|
||||
count: res.count || 0,
|
||||
data: res.data || []
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
renderTable();
|
||||
|
||||
form.on('submit(search)', function(data){
|
||||
renderTable();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btn-add').on('click', function(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '新增导航',
|
||||
area: ['640px', '600px'],
|
||||
content: '/system/nav/add'
|
||||
});
|
||||
});
|
||||
|
||||
table.on('tool(nav-table)', function(obj){
|
||||
var data = obj.data;
|
||||
if (obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑导航',
|
||||
area: ['640px', '600px'],
|
||||
content: '/system/nav/edit?navId=' + data.id
|
||||
});
|
||||
} else if (obj.event === 'remove'){
|
||||
layer.confirm('确定删除该导航吗?', function(idx){
|
||||
$.ajax({
|
||||
url: '/system/nav/remove/' + data.id,
|
||||
type: 'DELETE',
|
||||
success: function(res){
|
||||
if (res.success) { layer.msg(res.msg); obj.del(); }
|
||||
else layer.msg(res.msg);
|
||||
}
|
||||
});
|
||||
layer.close(idx);
|
||||
});
|
||||
} else if (obj.event === 'enable'){
|
||||
$.ajax({
|
||||
url: '/system/nav/enable',
|
||||
type: 'PUT',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({navId: data.id}),
|
||||
success: function(res){ layer.msg(res.msg); renderTable(); }
|
||||
});
|
||||
} else if (obj.event === 'disable'){
|
||||
$.ajax({
|
||||
url: '/system/nav/disable',
|
||||
type: 'PUT',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({navId: data.id}),
|
||||
success: function(res){ layer.msg(res.msg); renderTable(); }
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user