Files
iotlcm/README.md
T
2026-10-26 15:30:14 +08:00

81 lines
2.5 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.
# iotlcm-docs
iotLCM 物联网卡全生命周期管理平台的**使用手册与 OpenAPI 合同**。
- **使用手册**:Web 管理端(企业客户视角)与小程序端的操作说明,含截图
- **OpenAPI 合同**:V3 接口、旧版兼容接口、运营商能力代理(白名单转发 / 共享 Token)的鉴权方式、请求参数与响应结构
## 技术栈
VitePress 1.6 + Vue 3,产物为纯静态站点。
## 目录结构
```text
iotlcm-docs/
├── docs/ # 文档源(VitePress srcDir)
│ ├── index.md # 文档首页
│ ├── manual/ # 使用手册
│ │ ├── web/ # Web 管理端
│ │ └── mini-program/ # 小程序端
│ ├── openapi/ # OpenAPI 合同
│ │ ├── v3/ # V3 接口
│ │ ├── legacy/ # 旧版兼容接口
│ │ └── operator/ # 运营商能力代理
│ └── public/ # 静态资源(favicon、截图)
├── .vitepress/ # VitePress 配置与主题定制
├── docker/ # nginx 配置
├── Dockerfile
└── docker-compose.yml
```
## 本地开发
```bash
npm ci
npm run dev # http://127.0.0.1:5173/
```
构建与预览:
```bash
npm run build # 产物在 .vitepress/dist
npm run preview
```
站点部署在子路径 `/docs/`(见 `.vitepress/config.mts` 的 `base`)。本地开发时根路径会自动重定向 favicon。
## 容器化部署
```bash
docker build -t iotlcm-docs .
docker run -d -p 8080:80 iotlcm-docs
```
多阶段构建:Node 阶段执行 `vitepress build`,最终镜像只含 nginx 与静态产物。
`docker-compose.yml` 里的镜像名需替换成你自己的镜像仓库地址;对外署时请用不可变标签(commit sha)而不是 `latest`。
## 文档里的占位符
文档中的服务地址、凭据等均为占位示例:
| 占位 | 含义 |
| --- | --- |
| `iotlcm.example.com` | Web 管理端地址 |
| `api.iotlcm.example.com` | OpenAPI 服务地址 |
| `YOUR_APP_ID` / `YOUR_APP_SECRET` | 平台分配的应用凭据 |
| `YOUR_ACCESS_TOKEN` / `YOUR_TRANSID` | 调用方凭据与流水号 |
| `141****5152` | 示例手机号 |
替换成你自己的环境即可。
## 相关项目
- [iotlcm-openapi](https://git.5iot.com/iotlcm-public/iotlcm-openapi) —— OpenAPI 服务实现
- [iotlcm-admin-svr](https://git.5iot.com/iotlcm-public/iotlcm-admin-svr) —— Web 管理端后端
## License
[Apache License 2.0](./LICENSE)