update
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
// 语言由 Astro.currentLocale 运行时决定,实现见 components/views/AccountPage.astro(en/cn 共用)。
|
||||
import AccountPage from "@/components/views/AccountPage.astro"
|
||||
// 语言由 Astro.currentLocale 运行时决定,实现见 components/views/Account.astro(en/cn 共用)。
|
||||
import Account from "@/components/views/Account.astro"
|
||||
---
|
||||
|
||||
<AccountPage />
|
||||
<Account />
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
---
|
||||
export const prerender = false
|
||||
|
||||
// 旧 /item/[id] 保留为 301 重定向,按 id 类型前缀回退到对应类型化路由,避免外链 / SEO 权重失效。
|
||||
// r=runway → /runway-looks,s=street → /street-snaps,其余(含图像 i/j 经 parentUid 已回退)回落 runway。
|
||||
import { ROUTES, clientHref } from "@/lib/routes"
|
||||
|
||||
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)
|
||||
---
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
// 语言由 Astro.currentLocale 运行时决定,实现见 components/views/LoginPage.astro(en/cn 共用)。
|
||||
import LoginPage from "@/components/views/LoginPage.astro"
|
||||
// 语言由 Astro.currentLocale 运行时决定,实现见 components/views/Login.astro(en/cn 共用)。
|
||||
import Login from "@/components/views/Login.astro"
|
||||
---
|
||||
|
||||
<LoginPage />
|
||||
<Login />
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
export const prerender = false
|
||||
|
||||
// 走秀详情:类型化路由 /runway-looks/[id]。
|
||||
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/ItemPage.astro(en/cn 共用)。
|
||||
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/RunwayLooksDetail.astro(en/cn 共用)。
|
||||
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
|
||||
import ItemPage from "@/components/views/ItemPage.astro"
|
||||
import RunwayLooksDetail from "@/components/views/RunwayLooksDetail.astro"
|
||||
---
|
||||
|
||||
<ItemPage id={Astro.params.id} type="runway" />
|
||||
<RunwayLooksDetail id={Astro.params.id} />
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
export const prerender = false
|
||||
|
||||
// 街拍详情:类型化路由 /street-snaps/[id]。
|
||||
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/ItemPage.astro(en/cn 共用)。
|
||||
// 语言由 Astro.currentLocale 运行时决定,渲染实现见 components/views/StreetSnapsDetail.astro(en/cn 共用)。
|
||||
// id 必须在此取出后透传:prerender 只认页面模块的导出,Astro.params 留在页面更直观。
|
||||
import ItemPage from "@/components/views/ItemPage.astro"
|
||||
import StreetSnapsDetail from "@/components/views/StreetSnapsDetail.astro"
|
||||
---
|
||||
|
||||
<ItemPage id={Astro.params.id} type="street" />
|
||||
<StreetSnapsDetail id={Astro.params.id} />
|
||||
|
||||
Reference in New Issue
Block a user