Files
lovife c8837ee602 feat(file): 上传预检/秒传/批量处理/预览 + 缩略图(P2-7)与 H5 独立 dev server(P2-9)
缩略图:StorageService.thumbUrl(path, expire, maxLongSide),七牛在**签名之前**拼
imageView2/2/w/h(拼在签名之后必 401),本地存储回退原图,让调用方不必判断当前是什么存储。
实测 1454KB → 36KB(2.4%)、1600×1200 → 400×300。

F-73:秒传原来排在份数检查之后 → 网络重传得到「你超了」而不是「你已经传过了」。

H5 dev server:vite 加 /api 代理 + .env.development 把 VITE_API_BASE 设空串,
改一行不用再 build:h5;三端行为不同(dev→代理 / 构建产物→location.origin / 小程序→写死)。

验证:新增 e2e-m9-thumb.py 12/12(打到真实七牛)、e2e-m8-orgfile 54/54;
H5 与小程序两端构建都验过。
2026-09-30 09:02:56 +08:00

16 lines
839 B
Bash
Raw Permalink 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.
# H5 开发时的环境变量(`pnpm dev:h5` 用)
#
# ⚠️ 这个文件**只在 dev server 下生效**(vite 的 .env.development 约定)。
# 它是给"独立 dev server"用的,不是给构建产物用的。
#
# 为什么是**空串**:
# `src/config/index.ts` 的逻辑是"优先取 VITE_API_BASE,没有才用 location.origin"。
# dev server 下 location.origin 是 dev server 自己(≠ 后端),
# 所以这里显式设成空 → 走相对路径 → 由 `vite.config.ts` 的 server.proxy
# 把 /api 转发到 http://localhost:8080。
#
# ⚠️ 构建产物(`pnpm build:h5`,由后端托管)**不要**带这个变量 ——
# 那种场景下 location.origin 就是对的(页面与接口同源)。
# 所以它写在这里而不是 .env(后者对所有模式生效)。
VITE_API_BASE = ''