fix: 修复首页空白、小红书/游记封面图、定制页二维码

1. 首页大面积空白:useScrollReveal 添加 MutationObserver,
   确保异步子组件的 .reveal 元素也能触发入场动画

2. 小红书/游记封面图不显示:
   - 小红书 CDN 签名链接过期+防盗链,全部下载到本地
   - 新增 download-covers.mjs 脚本批量下载封面
   - 新增 useImageProxy composable 转换外部 URL
   - 页面 img 标签添加 referrerpolicy="no-referrer"
   - 管理端保存时自动下载外部封面图到本地
   - 种子数据更新为本地路径

3. 定制页微信号文字替换为二维码图片

4. prerender 路由添加 /xiaohongshu 和 /youji

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
这个提交包含在:
刘涛
2026-03-25 15:37:58 +08:00
共同撰写人 Claude Opus 4.6
父节点 b82712deed
当前提交 8832762e51
共修改 16 个文件,包含 599 行新增和 106 行删除
+11
查看文件
@@ -126,6 +126,17 @@ function addNote() {
async function save() {
saving.value = true
try {
// 自动下载外部封面图到本地
for (const note of data.value.notes) {
if (note.cover && note.cover.startsWith('http')) {
try {
const res = await adminFetch('/api/admin/download-image', { method: 'POST', body: { url: note.cover } })
note.cover = res.localUrl
} catch {
// 下载失败保留原 URL,不阻断保存
}
}
}
await adminFetch('/api/admin/site-content', { method: 'PUT', body: { key: 'xiaohongshu-wall', data: data.value } })
message.success('已保存')
} catch {
+11
查看文件
@@ -113,6 +113,17 @@ function addNote() {
async function save() {
saving.value = true
try {
// 自动下载外部封面图到本地
for (const note of data.value.notes) {
if (note.cover && note.cover.startsWith('http')) {
try {
const res = await adminFetch('/api/admin/download-image', { method: 'POST', body: { url: note.cover } })
note.cover = res.localUrl
} catch {
// 下载失败保留原 URL,不阻断保存
}
}
}
await adminFetch('/api/admin/site-content', { method: 'PUT', body: { key: 'youji', data: data.value } })
message.success('已保存')
} catch {