From af253f688a0d845a7f463e14b48252cab19cb6cb Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Sat, 2 May 2026 11:45:43 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=20SDK=20API=20?= =?UTF-8?q?=E9=87=8D=E8=AE=BE=E8=AE=A1=E3=80=81=E5=AE=89=E5=85=A8=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E8=A7=84=E8=8C=83=E5=92=8C=E6=B5=8B=E8=AF=95=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E8=B7=9F=E8=B8=AA=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 SDK API 重设计规范文档,统一各端 SDK 初始化、登录、消息接口 - 新增安全设计规范文档,涵盖密码安全、AppSecret 验证、令牌存储等安全要点 - 新增 Bug 跟踪记录文档,记录已修复问题和开放问题 - 新增测试进度跟踪文档,记录各模块测试覆盖情况和验证结果 --- README.md | 4 +- docs-site/docs/android/index.md | 4 +- docs-site/docs/ios/index.md | 4 +- docs-site/docs/rn/index.md | 2 +- docs-site/docs/server/api.md | 2 +- tenant-platform/src/router/index.ts | 4 - .../src/views/billing/BillingView.vue | 323 ------------------ .../src/views/layout/MainLayout.vue | 3 +- 8 files changed, 8 insertions(+), 338 deletions(-) delete mode 100644 tenant-platform/src/views/billing/BillingView.vue diff --git a/README.md b/README.md index 76a1e03..e0224c5 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ yarn workspace ops-platform dev | `/apps/:id` | AppDetailView | 应用详情(需登录) | | `/security` | SecurityCenterView | 安全中心(需登录) | | `/docs` | DocsCenterView | 接入文档(需登录) | -| `/packages` | BillingView | 服务套餐 / 配额(需登录) | | `/accounts` | SubAccountView | 子账号管理(需登录) | ### 认证流程 @@ -94,11 +93,10 @@ JWT Payload 由 `atob(token.split('.')[1])` 解析,无需额外请求。 - 每个平台下显示 `IM` / `推送` / `版本管理` 三个服务卡片 - 支持一键开关服务、复制 secretKey、重新生成 secretKey -### 安全中心 / 接入文档 / 服务套餐 +### 安全中心 / 接入文档 - 安全中心提供 AppSecret 查看/重置入口,直接复用邮箱验证码流程 - 接入文档页提供 RN、Android / iOS 和服务端的最短接入示例 -- 服务套餐页展示当前租户的配额和服务开通概览,不涉及费用计费 ### 子账号管理(SubAccountView) diff --git a/docs-site/docs/android/index.md b/docs-site/docs/android/index.md index effd10c..35f595a 100644 --- a/docs-site/docs/android/index.md +++ b/docs-site/docs/android/index.md @@ -52,7 +52,7 @@ XuqmSDK.initialize( ```kotlin // 登录(协程 suspend 函数) -// 只需要 userId + userSig,不需要 nickname / avatar / 过期字段 +// 只需要 userId + userSig,不需要 nickname / avatar / 生命周期字段 lifecycleScope.launch { XuqmSDK.login( userId = "user_001", @@ -160,7 +160,7 @@ XuqmSDK.logout() // ↓ 自动触发所有模块清理 ``` -> **注意**:`userSig` 由业务服务端签发,SDK 侧不做续签。若需更新登录态,请直接重新登录;如需撤销权限,可在租户平台重置 `appSecret` 或拉黑账号。 +> **注意**:`userSig` 由业务服务端签发。若需更新登录态,请直接重新登录;如需撤销权限,可在租户平台重置 `appSecret` 或拉黑账号。 ### 8. 版本更新 diff --git a/docs-site/docs/ios/index.md b/docs-site/docs/ios/index.md index 8feec8d..787d2ca 100644 --- a/docs-site/docs/ios/index.md +++ b/docs-site/docs/ios/index.md @@ -62,7 +62,7 @@ XuqmSDK.shared.initialize(config: config) import XuqmIM // 使用 UserSig 登录(推荐生产环境) -// 只需要 userId + userSig,不需要 nickname / avatar / 过期字段 +// 只需要 userId + userSig,不需要 nickname / avatar / 生命周期字段 try await XuqmSDK.shared.login(userId: "user_001", userSig: "your_user_sig_jwt") // 设置事件代理 @@ -203,7 +203,7 @@ try await XuqmSDK.shared.login(userId: "user_001", userSig: userSig) XuqmSDK.shared.logout() ``` -> **注意**:`userSig` 由业务服务端签发,SDK 侧不做续签。若需更新登录态,请直接重新登录。 +> **注意**:`userSig` 由业务服务端签发。若需更新登录态,请直接重新登录。 ### 10. 检查更新 diff --git a/docs-site/docs/rn/index.md b/docs-site/docs/rn/index.md index b7352f3..5e52b16 100644 --- a/docs-site/docs/rn/index.md +++ b/docs-site/docs/rn/index.md @@ -280,7 +280,7 @@ UserSig 生成方式见 [安全设计文档](../../design/02-security-design.md) XuqmGroup 是托管平台,服务地址统一管理,与腾讯云 IM 等平台的设计一致,开发者只需关心业务逻辑。 **Q: UserSig 是什么?** -UserSig 是您的业务服务端用 AppSecret 为用户签发的安全凭证,有效期可配置。AppSecret 绝不下发到客户端。 +UserSig 是您的业务服务端用 AppSecret 为用户签发的安全凭证。当前项目的 IM 登录不做过期功能,只校验 `userId + UserSig` 是否匹配。AppSecret 绝不下发到客户端。 **Q: 本地消息存储在哪里?** 使用 WatermelonDB(SQLite),按 `appKey + userId` 自动隔离,多账号切换安全。 diff --git a/docs-site/docs/server/api.md b/docs-site/docs/server/api.md index 0940dc5..1016fdd 100644 --- a/docs-site/docs/server/api.md +++ b/docs-site/docs/server/api.md @@ -50,7 +50,7 @@ POST /api/im/auth/login { "token": "eyJ..." } ``` -> SDK 侧不做续签;登录态更新由业务侧重新登录完成。 +> 登录态更新由业务侧重新登录完成。 --- diff --git a/tenant-platform/src/router/index.ts b/tenant-platform/src/router/index.ts index 9b01ab3..1983f70 100644 --- a/tenant-platform/src/router/index.ts +++ b/tenant-platform/src/router/index.ts @@ -41,10 +41,6 @@ const router = createRouter({ path: 'docs', component: () => import('@/views/docs/DocsCenterView.vue'), }, - { - path: 'packages', - component: () => import('@/views/billing/BillingView.vue'), - }, { path: 'operation-logs', component: () => import('@/views/logs/OperationLogView.vue'), diff --git a/tenant-platform/src/views/billing/BillingView.vue b/tenant-platform/src/views/billing/BillingView.vue deleted file mode 100644 index 2d8a9ff..0000000 --- a/tenant-platform/src/views/billing/BillingView.vue +++ /dev/null @@ -1,323 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/layout/MainLayout.vue b/tenant-platform/src/views/layout/MainLayout.vue index f23cb73..b71aaee 100644 --- a/tenant-platform/src/views/layout/MainLayout.vue +++ b/tenant-platform/src/views/layout/MainLayout.vue @@ -88,7 +88,7 @@ import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue' import { useAuthStore } from '@/stores/auth' import { useRoute, useRouter } from 'vue-router' -import { Coin, Document, Grid, Lock, Menu, Odometer, User } from '@element-plus/icons-vue' +import { Document, Grid, Lock, Menu, Odometer, User } from '@element-plus/icons-vue' const auth = useAuthStore() const route = useRoute() @@ -102,7 +102,6 @@ const navItems = computed(() => { { path: '/apps', label: '我的应用', icon: Grid }, { path: '/security', label: '安全中心', icon: Lock }, { path: '/docs', label: '接入文档', icon: Document }, - { path: '/packages', label: '服务套餐', icon: Coin }, { path: '/operation-logs', label: '操作日志', icon: Document }, ] if (auth.user?.type === 'MAIN') {