Files
hunli/.workbuddy/memory/MEMORY.md
2026-07-31 12:13:41 +08:00

22 lines
2.1 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.
# 婚礼请柬项目 · 长期备忘
## 架构
- 前端 `vite-tailwindcss`Vue3+Vite6+Tailwind4+Pinia+antd路由 history 模式(`/admin` 非 hashdev 端口 8888代理 `/api` → 8080。
- 后端 `hunliji-api`Go/Gin+GORM+MySQL改完必须 `go build` 并重启旧进程才生效404 多半是旧二进制)。
- 配置存后端单条 JSON前后端均做旧字段兼容musicUrl→musicList、缺省 height/borderStyle/singleWidth/速度参数)。
## 关键坑(不要再踩)
1. **`gf-frame` 绝不能设 position/width/height**frames.css 在 Tailwind 之后加载,同优先级后者胜出——`position:relative` 曾把 overlap 版的 `absolute` 静默冲掉元素退回静态流right/bottom 失效),这是错落双图溢出问题反复出现的总根因。布局定位只交给 Tailwind 工具类。
2. **滚动容器绝不能加 `scroll-smooth`**CSS smooth 会劫持 JS 的 scrollTop 赋值free 自动滚动会严重卡顿。snap 翻页用自研 rAF 动画(`smoothScrollTo`,时长=pageSwitchDuration
3. **动画摇曳禁用 margin-left**(每帧触发布局):外层跑位移、内层元素跑 transform 摇曳petal/petal-inner、heart-bubble/heart-inner 模式)。
4. **相册页高与图片容器要联动**:页高可能 auto/80vh图片容器写死 vh 会脱钩溢出 → 用 clamp 封顶 + 图片贴容器边缘。
5. `gf-natural` 保持原始比例单图铺满用负边距出血width:calc(100%+48px); margin:0 -24px 抵消 section p-6
## 环境
- 本机"安全删除"损坏rm 常失败vite build 用 `--outDir dist-chk-<ts>` 新目录验证,临时目录需手动清。
- 沙箱网络隔离:测宿主机服务要 dangerouslyDisableSandbox沙箱浏览器加载不了 unsplash裂图正常localhost 图正常。
- 浏览器实测用 agent-browserplaywright-cli 未装):多行 eval 写临时文件再 `eval "$(cat f)"`;截图落在 daemon cwdadmin 需先 localStorage 注入 admin_token可用 network route mock /api/config 验证配置渲染(不动数据库)。
## 凭证
后台 admin / admin123env 可覆盖)。