This commit is contained in:
toom1996
2026-09-16 00:55:27 +08:00
parent 3f79cef587
commit ad028c9ebd
15 changed files with 468 additions and 485 deletions

View File

@ -1,9 +1,12 @@
---
export const prerender = false
// 语言由 Astro.currentLocale 运行时决定,实现见 components/views/ItemPage.astro(en/cn 共用)。
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
import ItemPage from "@/components/views/ItemPage.astro"
---
// 旧 /item/[id] 保留为 301 重定向,按 id 类型前缀回退到对应类型化路由,避免外链 / SEO 权重失效。
// r=runway → /runway-looks,s=street → /street-snaps,其余(含图像 i/j 经 parentUid 已回退)回落 runway。
import { ROUTES, clientHref } from "@/lib/routes"
<ItemPage id={Astro.params.id} />
const id = Astro.params.id || ""
const isSnap = id[0] === "s"
const target = isSnap ? ROUTES.streetSnap(id) : ROUTES.runwayLook(id)
return Astro.redirect(clientHref(Astro.currentLocale || "cn", target), 301)
---

View File

@ -0,0 +1,10 @@
---
export const prerender = false
// 走秀详情:类型化路由 /runway-looks/[id]。
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/ItemPage.astro(en/cn 共用)。
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
import ItemPage from "@/components/views/ItemPage.astro"
---
<ItemPage id={Astro.params.id} type="runway" />

View File

@ -0,0 +1,10 @@
---
export const prerender = false
// 街拍详情:类型化路由 /street-snaps/[id]。
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/ItemPage.astro(en/cn 共用)。
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
import ItemPage from "@/components/views/ItemPage.astro"
---
<ItemPage id={Astro.params.id} type="street" />

View File

@ -1,9 +1,12 @@
---
export const prerender = false
// 语言由 Astro.currentLocale 运行时决定,实现见 components/views/ItemPage.astro(en/cn 共用)。
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
import ItemPage from "@/components/views/ItemPage.astro"
---
// 旧 /item/[id] 保留为 301 重定向,按 id 类型前缀回退到对应类型化路由,避免外链 / SEO 权重失效。
// r=runway → /runway-looks,s=street → /street-snaps,其余(含图像 i/j 经 parentUid 已回退)回落 runway。
import { ROUTES, clientHref } from "@/lib/routes"
<ItemPage id={Astro.params.id} />
const id = Astro.params.id || ""
const isSnap = id[0] === "s"
const target = isSnap ? ROUTES.streetSnap(id) : ROUTES.runwayLook(id)
return Astro.redirect(clientHref(Astro.currentLocale || "en", target), 301)
---

View File

@ -0,0 +1,10 @@
---
export const prerender = false
// 走秀详情:类型化路由 /runway-looks/[id]。
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/ItemPage.astro(en/cn 共用)。
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
import ItemPage from "@/components/views/ItemPage.astro"
---
<ItemPage id={Astro.params.id} type="runway" />

View File

@ -0,0 +1,10 @@
---
export const prerender = false
// 街拍详情:类型化路由 /street-snaps/[id]。
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/ItemPage.astro(en/cn 共用)。
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
import ItemPage from "@/components/views/ItemPage.astro"
---
<ItemPage id={Astro.params.id} type="street" />