SHA256
@@ -25,3 +25,9 @@ go.work.sum
|
|||||||
# env file
|
# env file
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# Build output
|
||||||
|
server/static/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
:root{--text:#6b6375;--text-h:#08060d;--bg:#fff;--border:#e5e4e7;--code-bg:#f4f3ec;--accent:#aa3bff;--accent-bg:#aa3bff1a;--accent-border:#aa3bff80;--social-bg:#f4f3ec80;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--heading:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;font:18px/145% var(--sans);letter-spacing:.18px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}@media (width<=1024px){:root{font-size:16px}}@media (prefers-color-scheme:dark){:root{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--social-bg:#2f303a80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}#social .button-icon{filter:invert()brightness(2)}}#root{text-align:center;border-inline:1px solid var(--border);box-sizing:border-box;flex-direction:column;width:1126px;max-width:100%;min-height:100svh;margin:0 auto;display:flex}body{margin:0}h1,h2{font-family:var(--heading);color:var(--text-h);font-weight:500}h1{letter-spacing:-1.68px;margin:32px 0;font-size:56px}@media (width<=1024px){h1{margin:20px 0;font-size:36px}}h2{letter-spacing:-.24px;margin:0 0 8px;font-size:24px;line-height:118%}@media (width<=1024px){h2{font-size:20px}}p{margin:0}code,.counter{font-family:var(--mono);color:var(--text-h);border-radius:4px;display:inline-flex}code{background:var(--code-bg);padding:4px 8px;font-size:15px;line-height:135%}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;overflow:hidden}body{-webkit-font-smoothing:antialiased;font-family:system-ui,Segoe UI,Roboto,sans-serif}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,8 +5,8 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>web</title>
|
<title>web</title>
|
||||||
<script type="module" crossorigin src="/assets/index-CYN43y86.js"></script>
|
<script type="module" crossorigin src="/assets/index.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DJHqorWS.css">
|
<link rel="stylesheet" crossorigin href="/assets/index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import { Card, Spin, Table, Tag, Typography } from 'antd';
|
||||||
|
import { getHigh100, type StockRank } from '../api/dashboard';
|
||||||
|
|
||||||
|
const { Title } = Typography;
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '#',
|
||||||
|
width: 50,
|
||||||
|
render: (_: unknown, __: unknown, i: number) => i + 1,
|
||||||
|
},
|
||||||
|
{ title: '代码', dataIndex: 'code', key: 'code', width: 80 },
|
||||||
|
{ title: '名称', dataIndex: 'name', key: 'name', width: 120 },
|
||||||
|
{
|
||||||
|
title: '最新价',
|
||||||
|
dataIndex: 'close',
|
||||||
|
key: 'close',
|
||||||
|
width: 90,
|
||||||
|
render: (v: number) => v?.toFixed(2),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '涨跌幅',
|
||||||
|
dataIndex: 'pct_change',
|
||||||
|
key: 'pct_change',
|
||||||
|
width: 100,
|
||||||
|
render: (v: number) => (
|
||||||
|
<Tag color={v >= 9.5 ? '#722ed1' : v >= 5 ? '#cf1322' : '#fa541c'}>
|
||||||
|
{v >= 0 ? '+' : ''}{v?.toFixed(2)}%
|
||||||
|
</Tag>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default function High100Page() {
|
||||||
|
const [data, setData] = useState<StockRank[]>([]);
|
||||||
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getHigh100()
|
||||||
|
.then(setData)
|
||||||
|
.finally(() => setLoading(false));
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'center', padding: 100 }}>
|
||||||
|
<Spin size="large" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const limitUp = data.filter((s) => s.pct_change >= 9.5).length;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ maxWidth: 800, margin: '0 auto' }}>
|
||||||
|
<Title level={2} style={{ textAlign: 'center', marginBottom: 24 }}>
|
||||||
|
百日新高
|
||||||
|
</Title>
|
||||||
|
|
||||||
|
<Card style={{ marginBottom: 16, textAlign: 'center' }}>
|
||||||
|
<Title level={4} style={{ margin: 0 }}>
|
||||||
|
今日创150日新高 <span style={{ color: '#cf1322', fontSize: 28 }}>{data.length}</span> 只
|
||||||
|
{limitUp > 0 && (
|
||||||
|
<span style={{ color: '#722ed1', marginLeft: 16 }}>
|
||||||
|
其中涨停 {limitUp} 只
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</Title>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card size="small">
|
||||||
|
<Table
|
||||||
|
columns={columns}
|
||||||
|
dataSource={data}
|
||||||
|
rowKey="code"
|
||||||
|
pagination={{ pageSize: 100, showSizeChanger: false, size: 'small' }}
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -3,6 +3,15 @@ import react from '@vitejs/plugin-react'
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
entryFileNames: 'assets/index.js',
|
||||||
|
chunkFileNames: 'assets/[name].js',
|
||||||
|
assetFileNames: 'assets/[name].[ext]',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
|
|||||||
Reference in New Issue
Block a user