feat(client): 按页面保存首页布局位置与隐藏状态

家属端 pages 改为包含 slot、position、hidden 的对象数组,移除 hiddenPages。家属端需同步更新。老人端专用读取接口返回可见分页顺序。
This commit is contained in:
tongtong committed 2026-11-26 03:14:59 +08:00
1 parent 9a1ce783f2
commit d9b923afc5
10 files changed
+195 -102

No files matched your search

+3 -3
View File
@@ -1,12 +1,12 @@
-- =============================================================================
-- 设备首页分页布局表(sys_sn_home_layout)
-- 说明:家属端可远程调整老人端(ElderlyDialer)桌面首页的分页顺序与默认页。
-- page_order 为逗号分隔的页面槽位顺序,取值:
-- page_order 为逗号分隔的固定分页顺序,隐藏页带 ! 前缀(如 home,!contact,settings):
-- settings - 设置页
-- contact - 联系人页
-- home - 首页(天气/时间/应用宫格)
-- apps - 应用页,数量随安装应用动态生成,恒排在最后,不参与排序
-- default_page 为开机 / 按 Home 键时展示的页面,必须是 page_order 中的槽位。
-- default_page 为开机 / 按 Home 键时展示的页面,必须是可见的固定分页。
-- 无记录的设备按默认布局处理(settings,contact,home + home),
-- 与历史版本行为保持一致。
-- =============================================================================
@@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `sys_sn_home_layout`
`serialno` VARCHAR(64) NOT NULL COMMENT '设备序列号(关联 sys_sn.serialno)',
-- ===================== 布局配置 =====================
`page_order` VARCHAR(128) NOT NULL DEFAULT 'settings,contact,home' COMMENT '首页分页顺序(逗号分隔:settings/contact/home,apps 恒在最后)',
`page_order` VARCHAR(128) NOT NULL DEFAULT 'settings,contact,home' COMMENT '固定分页顺序(逗号分隔,隐藏页带 ! 前缀)',
`default_page` VARCHAR(32) NOT NULL DEFAULT 'home' COMMENT '默认展示页(home/contact/settings)',
-- ===================== 通用字段 =====================