a6f763ffd8
- 修复token泄露风险:改用X-Local-Creds-Token请求头传递token,从URL Hash读取set_token避免日志记录 - 重构全站认证逻辑:提取公用工具函数统一各服务的认证校验流程 - 升级投资账本工具:支持本地上传CSV和粘贴文本,移除硬编码路径,适配新参数格式 - 新增403/404/500标准错误响应文件,统一API错误返回格式 - 优化后端配置:关闭ETag,重构CORS中间件,新增全局错误捕获,限制敏感文件访问 - 优化web zen box的Service Worker,支持音频分片请求与断点续传 - 清理冗余前端代码,调整页面格式与权限控制
94 lines
3.4 KiB
HTML
94 lines
3.4 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>投资事件账本</title>
|
|
<link rel="stylesheet" href="./investment_ledger.css" />
|
|
</head>
|
|
<body>
|
|
<main class="page">
|
|
<section class="panel">
|
|
<h1>投资事件账本 V1</h1>
|
|
<div class="form-grid">
|
|
<label>CSV 文件</label>
|
|
<input id="fileInput" type="file" accept=".csv,.txt,text/csv,text/plain" />
|
|
<label>CSV 文本</label>
|
|
<textarea id="rawText" rows="5" placeholder="可直接粘贴 CSV 原文;如果已选择文件,这里可以留空。"></textarea>
|
|
<label>标的代码</label>
|
|
<input id="symbol" type="text" value="510500" />
|
|
</div>
|
|
<div class="actions">
|
|
<button id="btnParse">开始解析</button>
|
|
<button id="btnAdd">新增事件</button>
|
|
<button id="btnExport" disabled>导出结果CSV</button>
|
|
</div>
|
|
<div id="status" class="status"></div>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<h2>汇总</h2>
|
|
<div id="summary" class="summary"></div>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<h2>事件明细</h2>
|
|
<div class="table-wrap">
|
|
<table id="tbl">
|
|
<thead>
|
|
<tr>
|
|
<th>事件ID</th>
|
|
<th>时间</th>
|
|
<th>标的</th>
|
|
<th>类型</th>
|
|
<th>方向</th>
|
|
<th>价格</th>
|
|
<th>数量</th>
|
|
<th>金额</th>
|
|
<th>仓位池</th>
|
|
<th>策略</th>
|
|
<th>链路</th>
|
|
<th>状态</th>
|
|
<th>来源行</th>
|
|
<th>备注</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
<div id="legend" class="legend"></div>
|
|
</section>
|
|
</main>
|
|
<div id="modalWrap" class="modal-wrap">
|
|
<div class="modal">
|
|
<div class="modal-head">
|
|
<h3 id="modalTitle">新增事件</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="modal-grid">
|
|
<label>时间</label><input id="m_event_time" type="date" />
|
|
<label>标的</label><input id="m_symbol" type="text" />
|
|
<label>事件类型</label><input id="m_event_type" type="text" value="fill" />
|
|
<label>方向</label><input id="m_side" type="text" value="buy" />
|
|
<label>价格</label><input id="m_price" type="number" step="0.001" />
|
|
<label>数量</label><input id="m_qty" type="number" step="1" />
|
|
<label>金额</label><input id="m_amount" type="number" step="0.01" />
|
|
<label>仓位池</label><input id="m_pocket" type="text" value="swing" />
|
|
<label>策略</label><input id="m_strategy_id" type="text" value="MANUAL_DIARY_v1" />
|
|
<label>链路</label><input id="m_chain_id" type="text" value="X" />
|
|
<label>状态</label><input id="m_status" type="text" value="filled" />
|
|
<label>父事件</label><input id="m_parent_event_ids" type="text" />
|
|
<label>备注</label><input id="m_note" type="text" />
|
|
</div>
|
|
</div>
|
|
<div class="modal-actions">
|
|
<button id="btnModalCancel" class="btn-secondary">取消</button>
|
|
<button id="btnModalSave">保存</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="./investment_ledger.js"></script>
|
|
</body>
|
|
</html>
|