- 新增系统设置、壁纸、图标包、设备管理、通讯录、通话、短信、相册、文件、应用、告警、信息、首页布局、账号安全、绑定手机号、法律条款等页面 - utils/api.ts 补齐设备操作、策略、壁纸、图标包等 /api/v1/client/** 接口,新增多文件上传 - 新增 utils/sse.ts 与 utils/wx-session.ts - 「更多/进入」指示统一改为图片箭头,首卡统一 .hero-card 高度,页面首卡贴顶 - AGENTS.md 补充功能对接状态与小程序 UI 约定
58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
const PRESETS: Record<string, { title: string; icon: string; body: string; link?: string }> = {
|
||
messages: {
|
||
title: '消息管理',
|
||
icon: '💬',
|
||
body: '服务端暂未提供站内消息列表与收发接口。设备在线状态已通过 SSE 实时推送;短信同步可在“短信记录”中使用。'
|
||
},
|
||
notify: {
|
||
title: '通知设置',
|
||
icon: '🔔',
|
||
body: '服务端暂未提供家属端消息推送偏好接口。设备通知栏与权限开关可在首页“系统设置”中调整。'
|
||
},
|
||
family: {
|
||
title: '家庭成员',
|
||
icon: '👨👩👧',
|
||
body: '当前设备绑定关系为一对一(SN 对应一个手机号),服务端尚未开放多人共管与家庭成员邀请接口。'
|
||
},
|
||
sharing: {
|
||
title: '家庭共享',
|
||
icon: '🤝',
|
||
body: '服务端暂未提供多人共管、邀请或权限分配接口。如需共享设备,请联系服务方另行开通。'
|
||
},
|
||
about: {
|
||
title: '关于同同关怀',
|
||
icon: '🏠',
|
||
body: '同同家庭关怀家属端 v0.1.0。用于查看已绑定设备状态、位置、截图与记录,并向设备下发远程指令。使用本小程序即表示同意用户协议与隐私政策。',
|
||
link: 'legal'
|
||
}
|
||
}
|
||
|
||
Page({
|
||
data: {
|
||
title: '功能说明',
|
||
icon: 'ℹ️',
|
||
body: '',
|
||
link: ''
|
||
},
|
||
|
||
onLoad(options: Record<string, string | undefined>) {
|
||
const preset = options.type ? PRESETS[options.type] : undefined
|
||
const title = preset?.title || options.title || '功能说明'
|
||
wx.setNavigationBarTitle({ title })
|
||
this.setData({
|
||
title,
|
||
icon: preset?.icon || 'ℹ️',
|
||
body: preset?.body || options.body || '该功能暂未开放。',
|
||
link: preset?.link || ''
|
||
})
|
||
},
|
||
|
||
onOpenAgreement() {
|
||
wx.navigateTo({ url: '/pages/legal/index?type=agreement' })
|
||
},
|
||
|
||
onOpenPrivacy() {
|
||
wx.navigateTo({ url: '/pages/legal/index?type=privacy' })
|
||
}
|
||
})
|