数据源修改

This commit is contained in:
cheney
2026-08-06 15:24:55 +08:00
parent b10b1c44db
commit ec15f40323
24 changed files with 2289 additions and 131 deletions
+5 -2
View File
@@ -45,10 +45,13 @@ export default function MacroPage() {
if (next) navigate(next.path)
}
// 详情页 /macro/articles/:slug 单独走 React Router 渲染, 不参与滑屏
if (location.pathname.match(/^\/macro\/articles\/[^/]+$/)) {
// 详情页 /macro/articles/:slug 和 /macro/data/:name 单独走 React Router 渲染, 不参与滑屏
// 这样浏览器/手机物理返回键也能正常回到列表
if (location.pathname.match(/^\/macro\/(articles|data|strategy)\/[^/]+$/)) {
return (
<Routes>
<Route path="data/:name" element={<DataView />} />
<Route path="strategy/:name" element={<StrategyView />} />
<Route path="articles/:slug" element={<ArticleDetail />} />
</Routes>
)