feat(family): 新增家庭圈路由与业务常量

This commit is contained in:
ozh 2026-09-09 14:45:31 +08:00
parent 23e61ba966
commit e88f1f0582
2 changed files with 18 additions and 0 deletions

16
src/constants/family.ts Normal file
View File

@ -0,0 +1,16 @@
// 家庭圈业务常量
// 每个家庭最多可添加的关爱对象数(设计图 2 文案)
export const MAX_CARED_PER_FAMILY = 2
// 每人最多紧急联系人数(设计图 4 说明文字)
export const MAX_EMERGENCY_CONTACTS = 5
// 家庭名最大长度(设计图 placeholder)
export const MAX_FAMILY_NAME_LEN = 10
// storage 单 key 持久化整个家庭圈数据集
export const FAMILY_DATA_STORAGE_KEY = 'familyData'
// mock 新建家庭 id 自增起点,避免与样例 id 冲突
export const MOCK_ID_SEED = 100000

View File

@ -8,5 +8,7 @@ export const ROUTES = Object.freeze({
DEVICE_CONFIG: '/pages/device/config', DEVICE_CONFIG: '/pages/device/config',
DEVICE_DETAIL: '/pages/device/detail', DEVICE_DETAIL: '/pages/device/detail',
FAMILY: '/pages/family/index', FAMILY: '/pages/family/index',
FAMILY_DETAIL: '/pages/family/detail',
FAMILY_CONTACT_ADD: '/pages/family/contact/add',
SCENE_SELECT: '/pages/scene/select' SCENE_SELECT: '/pages/scene/select'
}) })