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>
85 行
3.1 KiB
JavaScript
85 行
3.1 KiB
JavaScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||
export default defineNuxtConfig({
|
||
ssr: true,
|
||
|
||
nitro: {
|
||
// preset: 'static' 已移除——静态模式下 server/api/ 不可用。
|
||
// 部署时使用 `nuxt build` + Node.js 服务器(如 PM2)。
|
||
// 若必须静态部署,需将表单改为第三方服务(飞书/EmailJS 等)。
|
||
prerender: {
|
||
failOnError: false,
|
||
crawlLinks: true,
|
||
routes: [
|
||
'/', '/about', '/products', '/summer-camp', '/winter-camp', '/courses', '/guides', '/guide-custom', '/faq', '/reviews', '/contact', '/customize', '/pricing', '/selector', '/sitemap.xml',
|
||
'/products/v9-5d4n-forest', '/products/v9-5d4n-prairie',
|
||
'/products/v9-6d5n-family', '/products/v9-6d5n-explore',
|
||
'/products/v9-7d6n-family', '/products/v9-7d6n-wild',
|
||
'/products/autumn', '/products/winter',
|
||
'/gallery', '/news', '/calendar', '/stories', '/xiaohongshu', '/youji',
|
||
'/blog',
|
||
'/blog/hulunbuir-travel-guide-2026',
|
||
'/blog/hulunbuir-family-travel-guide',
|
||
'/blog/hulunbuir-best-month-to-visit',
|
||
'/blog/hulunbuir-self-drive-vs-chartered-bus',
|
||
'/blog/hulunbuir-travel-cost-breakdown',
|
||
'/blog/hulunbuir-travel-with-toddlers-4-6',
|
||
'/blog/hulunbuir-travel-tips-avoid-pitfalls',
|
||
'/blog/grassland-photography-outfit-guide',
|
||
'/destinations',
|
||
'/destinations/moriguole', '/destinations/eergunashire', '/destinations/baihualin',
|
||
'/destinations/enhe-shiwei', '/destinations/heishantou', '/destinations/manzhouli',
|
||
'/destinations/hulunhu', '/destinations/aershan',
|
||
'/destinations/daxinganling', '/destinations/aoluguya', '/destinations/genhe',
|
||
],
|
||
},
|
||
},
|
||
|
||
css: ['~/assets/less/global.less'],
|
||
|
||
vite: {
|
||
css: {
|
||
preprocessorOptions: {
|
||
less: {
|
||
additionalData: `@import "~/assets/less/variables.less"; @import "~/assets/less/mixins.less";`,
|
||
},
|
||
},
|
||
},
|
||
},
|
||
|
||
app: {
|
||
head: {
|
||
htmlAttrs: { lang: 'zh-CN' },
|
||
charset: 'utf-8',
|
||
viewport: 'width=device-width, initial-scale=1',
|
||
link: [
|
||
{ rel: 'icon', href: '/favicon.ico' },
|
||
{ rel: 'apple-touch-icon', href: '/images/logo-square.png' },
|
||
{ rel: 'dns-prefetch', href: 'https://beian.miit.gov.cn' },
|
||
],
|
||
meta: [
|
||
{ name: 'applicable-device', content: 'pc,mobile' },
|
||
{ 'http-equiv': 'Cache-Control', content: 'no-transform' },
|
||
// 内容语言
|
||
{ 'http-equiv': 'content-language', content: 'zh-CN' },
|
||
// 品牌全局声明 - AI 大模型采集时的全局上下文
|
||
{ name: 'application-name', content: '呼籁旅行' },
|
||
{ name: 'theme-color', content: '#3a7d44' },
|
||
// 允许 AI 索引
|
||
{ key: 'robots', name: 'robots', content: 'index, follow, max-snippet:-1, max-image-preview:large' },
|
||
],
|
||
},
|
||
},
|
||
|
||
runtimeConfig: {
|
||
public: {
|
||
apiBase: process.env.API_BASE || 'http://localhost:8000',
|
||
},
|
||
},
|
||
|
||
build: {
|
||
transpile: ['naive-ui', 'vueuc', '@css-render/vue3-ssr', 'css-render'],
|
||
},
|
||
|
||
compatibilityDate: '2025-03-18',
|
||
})
|