feat: 新增题材页面(列表 + 详情)

- 主页增加「题材热点」入口,跳转题材列表页
- 题材列表页:展示全部题材,支持按涨幅/强度/热度/成交额排序
- 题材详情页:简介、热点事件、相关新闻、板块涨跌统计、全部相关股票(含入选理由默认展开)
- 后端逆向封装东方财富题材接口 getThemeList/getDetail/getStockList,含交易时段感知缓存

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sakurasan
2026-08-06 17:22:04 +08:00
co-authored by Claude
parent b107a12798
commit 45836f4a30
8 changed files with 1100 additions and 11 deletions
+58 -3
View File
@@ -9,11 +9,18 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
import { Route as ThemesRouteImport } from './routes/themes'
import { Route as SectorsRouteImport } from './routes/sectors'
import { Route as IndexRouteImport } from './routes/index'
import { Route as ThemeCodeRouteImport } from './routes/theme.$code'
import { Route as StockCodeRouteImport } from './routes/stock.$code'
import { Route as ShareCodeRouteImport } from './routes/share.$code'
const ThemesRoute = ThemesRouteImport.update({
id: '/themes',
path: '/themes',
getParentRoute: () => rootRouteImport,
} as any)
const SectorsRoute = SectorsRouteImport.update({
id: '/sectors',
path: '/sectors',
@@ -24,6 +31,11 @@ const IndexRoute = IndexRouteImport.update({
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const ThemeCodeRoute = ThemeCodeRouteImport.update({
id: '/theme/$code',
path: '/theme/$code',
getParentRoute: () => rootRouteImport,
} as any)
const StockCodeRoute = StockCodeRouteImport.update({
id: '/stock/$code',
path: '/stock/$code',
@@ -38,39 +50,73 @@ const ShareCodeRoute = ShareCodeRouteImport.update({
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/sectors': typeof SectorsRoute
'/themes': typeof ThemesRoute
'/share/$code': typeof ShareCodeRoute
'/stock/$code': typeof StockCodeRoute
'/theme/$code': typeof ThemeCodeRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/sectors': typeof SectorsRoute
'/themes': typeof ThemesRoute
'/share/$code': typeof ShareCodeRoute
'/stock/$code': typeof StockCodeRoute
'/theme/$code': typeof ThemeCodeRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/sectors': typeof SectorsRoute
'/themes': typeof ThemesRoute
'/share/$code': typeof ShareCodeRoute
'/stock/$code': typeof StockCodeRoute
'/theme/$code': typeof ThemeCodeRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/sectors' | '/share/$code' | '/stock/$code'
fullPaths:
| '/'
| '/sectors'
| '/themes'
| '/share/$code'
| '/stock/$code'
| '/theme/$code'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/sectors' | '/share/$code' | '/stock/$code'
id: '__root__' | '/' | '/sectors' | '/share/$code' | '/stock/$code'
to:
| '/'
| '/sectors'
| '/themes'
| '/share/$code'
| '/stock/$code'
| '/theme/$code'
id:
| '__root__'
| '/'
| '/sectors'
| '/themes'
| '/share/$code'
| '/stock/$code'
| '/theme/$code'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
SectorsRoute: typeof SectorsRoute
ThemesRoute: typeof ThemesRoute
ShareCodeRoute: typeof ShareCodeRoute
StockCodeRoute: typeof StockCodeRoute
ThemeCodeRoute: typeof ThemeCodeRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/themes': {
id: '/themes'
path: '/themes'
fullPath: '/themes'
preLoaderRoute: typeof ThemesRouteImport
parentRoute: typeof rootRouteImport
}
'/sectors': {
id: '/sectors'
path: '/sectors'
@@ -85,6 +131,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/theme/$code': {
id: '/theme/$code'
path: '/theme/$code'
fullPath: '/theme/$code'
preLoaderRoute: typeof ThemeCodeRouteImport
parentRoute: typeof rootRouteImport
}
'/stock/$code': {
id: '/stock/$code'
path: '/stock/$code'
@@ -105,8 +158,10 @@ declare module '@tanstack/react-router' {
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
SectorsRoute: SectorsRoute,
ThemesRoute: ThemesRoute,
ShareCodeRoute: ShareCodeRoute,
StockCodeRoute: StockCodeRoute,
ThemeCodeRoute: ThemeCodeRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)