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5/src/style.css
new file mode 100644
index 0000000..50164a0
--- /dev/null
+++ b/apps/h5/src/style.css
@@ -0,0 +1,114 @@
+:root{font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#1c302d;background:#e8eeea;font-synthesis:none;--ink:#1c302d;--muted:#566e66;--paper:#fff;--line:#dee8e3;--accent:#1b604a;--soft:#e8f3eb;--background:#f6f8f5}
+*{box-sizing:border-box}
+body{margin:0}
+h1,h2,p{margin:0}
+h1{font-size:29px;font-weight:750;letter-spacing:-.04em}
+h2{font-size:16px;font-weight:700}
+small,.secondary{color:var(--muted);font-size:13px}
+:is(button,uni-button),input,select,textarea{font:inherit;color:inherit}
+:is(.phone,.photo-dialog) :is(button,uni-button){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;font-size:14px;font-weight:630;line-height:1.3;margin:0}
+:is(.phone,.photo-dialog) :is(button,uni-button)::after{border:0}
+:is(.phone,.photo-dialog) :is(button,uni-button):disabled{opacity:.49;cursor:default}
+:is(.phone,.photo-dialog) :is(button,uni-button):focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #268561;outline-offset:2px}
+:is(.phone,.photo-dialog) :is(button,uni-button) svg{flex-shrink:0}
+:is(.phone,.photo-dialog) .primary{background:var(--accent);border-color:var(--accent);color:#fff}
+:is(.phone,.photo-dialog) .quiet{background:transparent;border-color:transparent}
+:is(.phone,.photo-dialog) .inline{padding:0 5px;min-height:26px;background:transparent;color:inherit;border:0;text-decoration:underline}
+:is(.phone,.photo-dialog) .square{width:44px;padding:0}
+:is(.phone,.photo-dialog) .danger{color:#a63642}
+.phone{width:min(100%,560px);min-height:100dvh;margin:0 auto;padding:calc(12px + env(safe-area-inset-top)) 17px 26px;background:var(--background)}
+.welcome{display:flex;flex-direction:column;justify-content:center;gap:26px;padding-inline:clamp(22px,7vw,40px);background:linear-gradient(155deg,#e7efe5,#f9fbf8 62%);padding-bottom:calc(32px + env(safe-area-inset-bottom))}
+.welcome-brand,.brand-small{display:flex;align-items:center;gap:8px;font-weight:750;letter-spacing:.12em}
+.welcome-brand img{width:42px;height:42px;border-radius:10px}
+.welcome-brand{font-size:22px}
+.welcome-copy h1{font-size:clamp(38px,10vw,50px);line-height:1.11;letter-spacing:-.04em}
+.welcome-copy p{color:var(--muted);font-size:14px;margin-top:12px;max-width:33ch}
+.sign-form{padding-top:1px}
+.workbench{padding-bottom:calc(94px + env(safe-area-inset-bottom))}
+.work-top,.section-top,.subhead,.page-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
+.work-top{min-height:44px;margin-bottom:15px}
+.brand-small img{width:32px;height:32px;border-radius:8px}
+.brand-small{font-size:18px}
+.space-select{display:flex;align-items:center;gap:5px;max-width:62%;min-height:40px;padding:0 8px;border:1px solid var(--line);border-radius:10px;background:white;color:#315c4b}
+.space-select svg{flex-shrink:0}
+.space-select select{min-width:0;border:0;appearance:none;background:transparent;font-size:14px}
+.section-top{min-height:44px;margin-bottom:10px}
+.subhead{margin:14px 0 8px;min-height:40px;flex-wrap:wrap}
+.subhead :is(button,uni-button){min-height:34px;padding:0 5px}
+.search{display:flex;align-items:center;gap:9px;min-height:48px;padding:0 10px;background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:12px;color:var(--muted)}
+.search input,.search uni-input{flex:1;min-width:0;border:0;background:transparent;height:44px;padding:0;color:var(--ink)}
+.search .square{width:35px;min-height:37px}
+.card{background:var(--paper);border:1px solid var(--line);border-radius:13px;min-width:0}
+.row-list{display:grid;overflow:hidden}
+:is(.phone,.photo-dialog) .result-row{width:100%;justify-content:start;gap:10px;padding:10px;border:0;border-radius:0;min-height:59px;text-align:left}
+.result-row+.result-row{border-top:1px solid #edf1ef}
+.result-row>svg:last-child{margin-left:auto;color:#648176}
+.row-info{display:grid;gap:4px;flex:1;min-width:0;overflow-wrap:anywhere}
+.row-info strong{font-size:15px;line-height:1.22}
+.row-info span{font-size:12px;color:var(--muted);line-height:1.3}
+.tile{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;border-radius:10px;background:var(--soft);color:var(--accent)}
+.tile.amber{background:#f3eee1;color:#7b6037}
+.blank{display:grid;min-height:200px;align-content:center;justify-items:center;gap:10px;color:var(--muted);padding:25px 10px;text-align:center}
+.blank h1,.blank h2{color:var(--ink)}
+.center{text-align:center;padding:13px}
+.notice{padding:10px 11px;border-radius:8px;background:#e8f3ed;line-height:1.45;font-size:13px;overflow-wrap:anywhere}
+.notice.error{background:#fdf0ee;color:#98343d}
+.workbench>.notice,.panel-page>.notice{margin-bottom:10px}
+.profile-card{display:flex;align-items:center;gap:10px;padding:15px;margin-bottom:13px}
+.profile-card p{color:var(--muted);font-size:13px;margin-top:3px}
+.dock{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,560px);display:flex;align-items:center;justify-content:space-around;gap:2px;z-index:5;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border-top:1px solid #dde6e0;background:#fcfdfb}
+.dock :is(button,uni-button){flex:1;flex-direction:column;gap:4px;min-height:48px;padding:0;border:0;background:none;font-size:11px;color:var(--muted)}
+.dock :is(button,uni-button)[aria-current=page]{color:var(--accent);font-weight:750}
+.dock .dock-add span{display:grid;place-items:center;width:37px;height:33px;border-radius:11px;background:var(--accent);color:#fff}
+.panel-page{padding-bottom:calc(25px + env(safe-area-inset-bottom))}
+.page-top{justify-content:start;min-height:48px;margin-bottom:12px}
+.page-top h1{font-size:21px}
+.detail-hero{display:flex;align-items:center;padding:12px;gap:10px;margin-bottom:9px;overflow-wrap:anywhere}
+.detail-hero .tile{width:49px;height:49px}
+.detail-hero .square{margin-left:auto}
+.detail-hero h2{font-size:21px}
+.detail-hero p{font-size:12px;margin-top:4px;color:var(--muted)}
+.detail-section{padding:11px 12px;margin-bottom:9px;display:grid;gap:8px}
+.detail-section .section-top{margin:0;min-height:25px}
+.location-path{display:flex;align-items:start;gap:6px;color:#356454;font-size:14px;line-height:1.45;margin-bottom:8px;overflow-wrap:anywhere}
+.location-path svg{flex-shrink:0}
+.detail-section dl{margin:0;display:grid;gap:4px;grid-template-columns:64px minmax(0,1fr);font-size:13px}
+.detail-section dt{color:var(--muted)}
+.detail-section dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
+.history-row{display:grid;gap:4px;font-size:13px}
+.history-row svg{vertical-align:middle}
+.history-row time{color:var(--muted);font-size:11px}
+.archive{margin:6px auto 0;display:flex}
+.form{display:grid;gap:10px;min-width:0;margin:0}
+.form :is(label,uni-label){display:grid;gap:5px;font-size:13px;font-weight:650;min-width:0}
+.form input,.form uni-input,.form select,.form textarea,.form uni-textarea{width:100%;min-width:0;padding:8px 9px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:16px;font-weight:450}
+.form .uni-input-input,.form .uni-textarea-textarea{padding:0;font:inherit}
+.form uni-textarea{min-height:88px;height:103px}
+.form textarea{resize:vertical}
+.form-actions{display:flex;justify-content:end;gap:7px;flex-wrap:wrap}
+.create-form,.intake-form{padding:12px}
+.create-form{margin-top:12px}
+.add-place{margin-top:9px}
+.move-form{padding-top:8px;border-top:1px solid var(--line)}
+.segmented{display:flex;gap:4px;margin-bottom:11px;padding:4px;background:#eaf0ec;border-radius:10px}
+.segmented :is(button,uni-button){flex:1;border-color:transparent;background:transparent;min-height:39px;padding:0 5px;font-size:13px}
+.segmented :is(button,uni-button)[aria-pressed=true]{background:#fff;border-color:var(--line);color:var(--accent)}
+.draft-row{display:grid;grid-template-columns:50px minmax(0,1fr) 62px;gap:5px;padding:6px 0;border-bottom:1px solid var(--line)}
+.draft-row :is(label,uni-label),.draft-row small{grid-column:1/-1}
+.draft-row :is(button,uni-button)[aria-pressed=true]{background:var(--soft);color:var(--accent)}
+.draft-row :is(button,uni-button){font-size:12px;padding:0}
+.photo-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
+.photo-strip :is(button,uni-button){aspect-ratio:1;padding:0;overflow:hidden}
+.photo-strip img{width:100%;height:100%;object-fit:cover}
+.photo-dialog{width:min(93vw,480px);border:1px solid var(--line);border-radius:13px;padding:12px;color:var(--ink);max-height:88dvh}
+.photo-dialog::backdrop{background:#14272688}
+.crop-area{width:min(100%,355px);aspect-ratio:1;touch-action:none;background:#e5eeea;border-radius:8px;overflow:hidden;margin:0 auto 8px}
+.crop-area canvas{display:block;width:100%;height:100%}
+.large-photo{display:block;max-width:100%;max-height:64vh;margin:0 auto 8px;border-radius:8px;object-fit:contain}
+@media(min-width:561px){.phone{box-shadow:0 0 45px #193d2d14}}
+
+/* Uni wraps a form's slots in a span on H5. Lay out the actual controls inside it. */
+uni-form.form > span{display:grid;gap:10px;min-width:0}
+uni-form.search > span{display:flex;align-items:center;gap:9px;width:100%;min-width:0}
+.phone .dock :is(button,uni-button){display:flex;flex-direction:column}
+.phone .archive{margin:6px auto 0}
diff --git a/apps/h5/src/types.ts b/apps/h5/src/types.ts
new file mode 100644
index 0000000..06a0e1d
--- /dev/null
+++ b/apps/h5/src/types.ts
@@ -0,0 +1,18 @@
+export type Space = { id: string; name: string; role: 'OWNER' | 'EDITOR' | 'VIEWER' }
+export type Place = { id: string; parentId: string | null; name: string; path: string; depth: number; sortRank: number | null }
+export type Item = {
+ id: string; name: string; quantity: number; notes: string; locationId: string | null;
+ locationPath: string; version: number; aliases: string[]; coverPhotoId: string | null; priceCents: number | null
+}
+export type ItemDetail = {
+ item: Item
+ moves: { fromPath: string; toPath: string; movedAt: string }[]
+ relations: { itemId: string; name: string; locationPath: string; kind: string }[]
+ preference: { favorite: boolean; rating: number | null; note: string }
+}
+export type Draft = {
+ id: string; version: number; status: string
+ candidates: { name: string; quantity: number | null; action: 'RECORD' | 'SKIP' | 'REVIEW'; location: string | null }[]
+}
+export type Operation = { id: string; status: string }
+export const family = (space: string) => '/api/households/' + space
diff --git a/apps/h5/src/workspace.ts b/apps/h5/src/workspace.ts
new file mode 100644
index 0000000..b46622b
--- /dev/null
+++ b/apps/h5/src/workspace.ts
@@ -0,0 +1,53 @@
+import { computed, ref, watch } from 'vue'
+import { api, signedIn } from './api'
+import { family, type Place, type Space } from './types'
+
+export const spaces = ref([])
+export const activeSpace = ref()
+export const places = ref([])
+export const revision = ref(0)
+export const canWrite = computed(() => !!activeSpace.value && activeSpace.value.role !== 'VIEWER')
+let locationRequest: AbortController | undefined
+
+export function selectSpace(space: Space) {
+ if (activeSpace.value?.id === space.id) return
+ locationRequest?.abort()
+ activeSpace.value = space
+ places.value = []
+ revision.value++
+}
+
+export async function loadSpaces() {
+ spaces.value = await api('/api/households')
+ const selected = spaces.value.find((space) => space.id === activeSpace.value?.id) ?? spaces.value[0]
+ if (selected) selectSpace(selected)
+ else { activeSpace.value = undefined; places.value = []; revision.value++ }
+}
+
+export async function loadPlaces() {
+ const space = activeSpace.value
+ if (!space) return
+ locationRequest?.abort()
+ const request = new AbortController()
+ locationRequest = request
+ try {
+ const result = await api(family(space.id) + '/locations', { signal: request.signal })
+ if (!request.signal.aborted && activeSpace.value?.id === space.id) places.value = result
+ } catch (error) { if (!request.signal.aborted) throw error }
+}
+
+export function backHome() { void uni.reLaunch({ url: '/pages/index' }) }
+export function openItem(id: string) { void uni.navigateTo({ url: '/pages/item?id=' + encodeURIComponent(id) }) }
+export function openIntake(location = '', item = '') {
+ if (!canWrite.value) return
+ void uni.navigateTo({ url: '/pages/intake?location=' + encodeURIComponent(location) + '&item=' + encodeURIComponent(item) })
+}
+
+watch(signedIn, (active) => {
+ if (active) return
+ locationRequest?.abort()
+ spaces.value = []
+ activeSpace.value = undefined
+ places.value = []
+ revision.value++
+})
diff --git a/apps/h5/tsconfig.json b/apps/h5/tsconfig.json
new file mode 100644
index 0000000..329175d
--- /dev/null
+++ b/apps/h5/tsconfig.json
@@ -0,0 +1,13 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "ESNext",
+ "moduleResolution": "Bundler",
+ "strict": true,
+ "skipLibCheck": true,
+ "noEmit": true,
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "types": ["@dcloudio/types", "vite/client"]
+ },
+ "include": ["src/**/*.ts", "src/**/*.vue"]
+}
diff --git a/apps/h5/vite.config.mjs b/apps/h5/vite.config.mjs
new file mode 100644
index 0000000..60b9158
--- /dev/null
+++ b/apps/h5/vite.config.mjs
@@ -0,0 +1,16 @@
+import { defineConfig } from 'vite'
+import plugin from '@dcloudio/vite-plugin-uni'
+
+export default defineConfig({
+ plugins: [(plugin.default ?? plugin)()],
+ server: {
+ host: '127.0.0.1',
+ proxy: {
+ '/api': {
+ target: process.env.ATLAS_GATEWAY_URL || 'https://pc-atlas.tutudog.com',
+ changeOrigin: true,
+ proxyTimeout: 85000,
+ },
+ },
+ },
+})
diff --git a/docs/architecture/clients.md b/docs/architecture/clients.md
index 49208ba..32409ec 100644
--- a/docs/architecture/clients.md
+++ b/docs/architecture/clients.md
@@ -4,7 +4,7 @@
| 端 | 技术选型 | 使用与交付 |
| --- | --- | --- |
-| H5 | uni-app(Vue 3、TypeScript、Vite),使用 DCloud 的 CLI 模板 | 面向临时找物、相机上传和快速录入。首版构建 H5 静态文件,由 Nginx 镜像托管。 |
+| H5 | uni-app(Vue 3、TypeScript、Vite),使用 DCloud 的 CLI 模板 | [移动网页](../../apps/h5/README.md)面向手机找物、照片裁剪和快速录入。构建 H5 静态文件,由独立 Nginx 镜像托管。 |
| PC 网页 | Vue 3、TypeScript、Vite、Vue Router | [桌面工作台](../../apps/pc/README.md)支持搜索、物品录入、移位和两级平面图。独立 Nginx 镜像。 |
| 管理后台 | Vue 3、TypeScript、Vite、Element Plus | 已有空间查询、删除及图片清理入口。独立 Nginx 镜像。其他管理模块有多页路由需求时接入 Vue Router。 |
| iOS | Swift、SwiftUI,最低 iOS 17 | [iOS 应用](../../apps/ios/README.md)接入账号、空间、物品、草稿和相册上传。拍照和录音按后续原生端验收范围补齐。 |
diff --git a/docs/testing/cases.md b/docs/testing/cases.md
index 7658fcd..a733316 100644
--- a/docs/testing/cases.md
+++ b/docs/testing/cases.md
@@ -63,5 +63,6 @@ R01–R10 对应[需求与验收](../product/requirements.md)。实现和当前
| TC-52 从平面图选存放位置 | R03、R06、R11 | 在手动添加、智能草稿或移位中打开位置选择,点「从平面图选择」。点房间,进入室内位置,再从家具进入抽屉。另选一次没有摆在图上的位置,并取消一次选择。 | 标记和底部路径随点选更新。可直接选房间或家具,也可进入抽屉。未摆放位置可从列表选。选中只回填表单,取消保留原位置。 |
| TC-53 浏览下级位置的物品 | R04、R11 | 在主卧和主卧抽屉各放一件物品,另在其他房间和无位置各放一件。在主卧详情来回切换物品范围。用只读成员重试,移动或归档抽屉里的物品后刷新。 | 「仅此位置」只显示直接存放的物品。「含下级位置」也显示抽屉里的物品和完整路径,两种范围的分页和缓存独立。其他房间、无位置和归档物品不混入。 |
| TC-54 PC 建模和找物联动 | R03、R04、R11、R12 | 在桌面浏览器添加房间,拖动后撤回和重做,改右侧宽深并保存。在室内图添加书桌,再从书桌进入录入,按别名找物并回到平面图定位。另试放弃修改、AI 预览和保存版本冲突。 | 全屋与室内使用各自的布局。操作可撤销,确认保存后重读一致。录入沿用书桌位置,人工保存前 AI 草稿不落库,版本冲突仍保留本地修改。 |
+| TC-55 H5 录入与照片 | R01、R02、R03、R04、R06、R09 | 在手机浏览器登录,新增房间与收纳盒,从盒子录入物品。选照片裁剪,分别看缩略图和原图。确认移位并搜索别名。再提交带两条物品的文字草稿和检查只读角色。 | 录入带入完整位置,图片按裁剪结果保存。删除后列表移除该照片。已确认的批量草稿可在列表重读。只读角色可找物,详情保留查看入口。 |
[测试与演示计划](plan.md)