item-atlas/docs/architecture/clients.md

20 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 客户端与后台
各端共用 API 契约、登录身份和家庭数据。先对齐 OpenAPI、错误码和关键交互,每个端按自己的使用场景安排页面。
| 端 | 技术选型 | 使用与交付 |
| --- | --- | --- |
| H5 | uni-app(Vue 3、TypeScript、Vite),使用 DCloud 的 CLI 模板 | 面向临时找物、相机上传和快速录入。首版构建 H5 静态文件,由 Nginx 镜像托管。 |
| PC 网页 | Vue 3、TypeScript、Vite、Vue Router | 面向批量草稿、详情查看和浏览位置树。独立 Nginx 镜像。 |
| 管理后台 | Vue 3、TypeScript、Vite、Vue Router、Element Plus | 用数据表格和表单处理模型状态、用量、用户及家庭管理。独立 Nginx 镜像。 |
| iOS | Swift、SwiftUI | Xcode 工程。原生调用相机和录音能力,直接请求项目的 HTTPS API。 |
| Android | Kotlin、Jetpack Compose | Gradle 工程。相机、录音走 Android 平台能力,使用同一 HTTPS API。 |
H5 选 uni-app 是为了用贴合移动端的组件和构建方式。正式交付范围只包含网页。微信小程序本期不列入需求、目录或构建目标。PC 和后台要处理高密度列表、桌面键盘交互以及表单,用标准 Vue 网页工程。Web 各端共享合适的 API 类型、校验和文案,H5 的 uni-app 组件单独维护。 [uni-app CLI](https://uniapp.dcloud.net.cn/worktile/CLI.html) · [uni-app Vue 3 TypeScript 模板](https://uniapp.dcloud.net.cn/quickstart-cli.html) · [Vue TypeScript](https://vuejs.org/guide/typescript/overview) · [Vue Router](https://router.vuejs.org/) · [Element Plus](https://element-plus.org/en-US/guide/quickstart)
三个 Web 站点在自己的域名下通过 `/api` 访问网关,原生端连接 `https://api-atlas.tutudog.com`。家庭权限由后端校验,后台接口另验管理角色。模型尚未配置时界面显示状态,凭证从服务环境读取。
首批界面定稿覆盖 H5、PC 和后台。iOS 与 Android 按原生平台的导航、拍照、录音及权限规范单独设计。最低系统版本、签名和商店发布安排在原生端启动时确认。 [SwiftUI](https://developer.apple.com/swiftui/) · [Jetpack Compose](https://developer.android.com/compose)
[客户端工程目录](../../apps/README.md) · [产品需求](../product/requirements.md) · [部署与域名](../deployment/overview.md)