feat(web): 前端全局重构专业量化后台(深色+红涨绿跌+设计系统)
- 设计系统 styles/tokens.css: 深色token(#0d1117底/#161b22卡片) + 红涨绿跌 (--up#f85149/--down#3fb950) + 品牌蓝#1890ff + 间距/圆角/阴影/mono - Element Plus深色(element-dark.css + dark/css-vars)+reset - 删Vite脚手架残留(style.css重写/HelloWorld/hero/vite/vue资源) - Layout重构(深色专业侧边)+Login+图表统一深色(useChart/echartsDark) - 新建paper/Live.vue实走监控(step状态/净值/持仓/今日信号10s轮询) - 业务页套.page头, 保留所有功能/路由/api - 验证: vue-tsc --noEmit ✅ + npm run build ✅
This commit is contained in:
@@ -24,6 +24,14 @@ export interface PaperAccount {
|
||||
mode: string
|
||||
interval: string
|
||||
status: string
|
||||
symbols?: string
|
||||
initial_capital?: number
|
||||
start_date?: string
|
||||
end_date?: string
|
||||
last_run_date?: string | null
|
||||
next_run_at?: string | null
|
||||
checkpoint_date?: string | null
|
||||
error_msg?: string | null
|
||||
}
|
||||
|
||||
export interface BalancePoint {
|
||||
@@ -54,6 +62,24 @@ export interface StrategySummary {
|
||||
commission: number
|
||||
}
|
||||
|
||||
export interface PositionRow {
|
||||
symbol: string
|
||||
volume: number
|
||||
frozen: number
|
||||
avg_price: number
|
||||
}
|
||||
|
||||
export interface PendingOrder {
|
||||
strategy_id: string
|
||||
symbol: string
|
||||
side: string
|
||||
price: number
|
||||
volume: number
|
||||
is_market: boolean
|
||||
match_session: string
|
||||
listing_days: number
|
||||
}
|
||||
|
||||
export async function createPaper(req: PaperCreate): Promise<number> {
|
||||
const { data } = await apiClient.post<{ account_id: number }>('/paper/create', req)
|
||||
return data.account_id
|
||||
@@ -78,3 +104,13 @@ export async function getStrategies(aid: number): Promise<StrategySummary[]> {
|
||||
const { data } = await apiClient.get<StrategySummary[]>(`/paper/${aid}/strategies`)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function getPositions(aid: number): Promise<PositionRow[]> {
|
||||
const { data } = await apiClient.get<PositionRow[]>(`/paper/${aid}/positions`)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function getPending(aid: number): Promise<PendingOrder[]> {
|
||||
const { data } = await apiClient.get<PendingOrder[]>(`/paper/${aid}/pending`)
|
||||
return data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user