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>
这个提交包含在:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
在新工单中引用
屏蔽一个用户