item-atlas/apps/h5/README.md

30 lines
1.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.

# 见物移动网页
在手机浏览器中使用现有见物账号,空间、位置和物品与 iOS 和 PC 共用。找物支持按名称、别名和位置搜。位置页可以逐层查看,已有下级时可汇总其中的物品。录入提供表单和文字批量草稿,存放位置可留空。
物品详情支持编辑、移位、收藏及照片。拍照和相册统一进入裁剪,输入上限 30 MiB,输出最长边 1440 像素、上限 5 MiB。上传后显示服务端的缩略图,点开读取原图。照片写入、删除和清理走现有物品接口。能否直接调起摄像头取决于浏览器和设备。
公网入口为 [m-atlas.tutudog.com](https://m-atlas.tutudog.com)。 [发布与回退](../../deploy/public/README.md#h5-移动网页)
## 本地启动
使用 Node.js 24。工作目录为仓库根目录。
```sh
npm --prefix apps/h5 ci
npm --prefix apps/h5 run dev -- --port 4180
```
打开 `http://127.0.0.1:4180`。开发代理默认为已开通的 PC 公网入口,也可以用 `ATLAS_GATEWAY_URL` 指定目标网关。会话保留在页面内存中,整页刷新后重新登录。
## 构建镜像
```sh
npm --prefix apps/h5 run build
docker build -t item-atlas-h5:0.1.0 apps/h5
```
产物位于 `dist/build/h5`,路由使用 URL 的片段。Nginx 容器监听 8080,健康检查用 `/healthz`,通过同源 `/api` 访问内部网关。Drone 的 `build-h5` 步骤执行依赖锁定和构建检查。
[H5 工程模板](https://uniapp.dcloud.net.cn/quickstart-cli.html) · [客户端架构](../../docs/architecture/clients.md)