接口文档

目录独立于苹果 CMS,只共享用户表、管理员表和登录态规则。

接入说明

真正独立系统
1. 管理后台独立访问 `index.php`,不再依赖苹果 CMS 控制器和模板。
2. 当前建议域名:独立系统使用 `user.jlen.top`,苹果 CMS 使用 `cms.jlen.top`。
3. `auth_status` 会读取 `.jlen.top` 共享 cookie 来判断 `cms.jlen.top` 的登录状态。
4. 苹果 CMS 侧必须把 cookie 域设置为 `.jlen.top`,并且用户需要在 `cms.jlen.top` 重新登录一次。
5. 在线、公告、仪表盘统计默认写入当前目录 `storage/`,避免继续给主库增加压力。

心跳上报

API
请求地址https://user.jlen.top/api.php?action=heartbeat
鉴权
示例参数{"user_id":123,"device_id":"android-001","platform":"android","app_version":"1.0.0","route":"home"}

公告列表

API
请求地址https://user.jlen.top/api.php?action=notices
鉴权
示例参数?app_version=1.0.0&user_id=123,返回 content/content_format/html 供详情页渲染

登录状态

API
请求地址https://user.jlen.top/api.php?action=auth_status
鉴权
示例参数读取 .jlen.top 共享 cookie

当前用户信息

API
请求地址https://user.jlen.top/api.php?action=me
鉴权否,基于共享 cookie
示例参数返回当前登录用户完整资料

在线统计

API
请求地址https://user.jlen.top/api.php?action=online
鉴权是,Header: X-AppCenter-Token
示例参数

仪表盘摘要

API
请求地址https://user.jlen.top/api.php?action=summary
鉴权是,Header: X-AppCenter-Token
示例参数