fix: 修复 getBasic.inc.php 多余括号 & 重构研究报告卡片
- 删除 index-2.php 中 PDF 报告卡片(6 个硬编码链接) - 研究报告卡片改为动态加载:扫描 research/yyyymmdd/ 子目录生成下拉框 - 选中日期后显示该目录下所有 HTML 文件(提取 <title> 作为链接名) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+24
-24
@@ -2,45 +2,45 @@
|
|||||||
|
|
||||||
## 当前状态
|
## 当前状态
|
||||||
|
|
||||||
前端库清理、机构持仓页面废弃、DB→API 数据源替换已全部完成。
|
index-2.php 研究报告卡片重构完成并已部署,getBasic.inc.php 解析错误已修复。GitHub 认证未配置,推送被阻塞。
|
||||||
|
|
||||||
## 已完成
|
## 已完成
|
||||||
|
|
||||||
1. **前端库清理与标准化**
|
1. **index-2.php 重构**
|
||||||
- 删除重复库文件:`lib/DataTables-2/`、`lib/echarts/`、`libai/`、`css/fontawesome/` 等 ~695K 行冗余代码
|
- 删除 PDF报告卡片(6 个硬编码 PDF 链接)
|
||||||
- 下载外部 CDN 到本地:Mermaid 10.6.1、AOS 2.3.1、Google Fonts(Inter/Noto Serif SC/Noto Sans SC)
|
- 研究报告卡片改为动态加载:扫描 `research/yyyymmdd/` 格式子目录,生成下拉选择框
|
||||||
- 统一命名规范:`lib/js/库名-版本号.js`、`lib/css/库名-版本号.css`
|
- 选中日期后显示该子目录下所有 HTML 文件链接(用 `<title>` 元素作为链接名)
|
||||||
- 更新所有 HTML/PHP 引用路径(8 个 research 页面、news/test-index.html)
|
- 部署到 `simon@www.doorcome.cn:/var/www/html/echart/`
|
||||||
|
|
||||||
2. **废弃机构持仓图表页面**
|
2. **getBasic.inc.php 修复**
|
||||||
- `chartSix.php`、`chartThree.php`、`stock_ih.php`、`index_ih.php` 移至 `deprecated/`
|
- API 替换后残留的多余 `}` 导致部署后 PHP 解析错误(Unmatched `}`)
|
||||||
- 从 `index.php`、`index-2.php` 移除导航链接
|
- 已删除并重新部署
|
||||||
|
|
||||||
3. **DB→API 数据源替换**
|
3. **Chart 页面数据源审计**
|
||||||
- 新增 `callDoorcomeApi()` 共享函数(`inc/functions.inc.php`)
|
- 7 个页面已使用 api.doorcome.cn(无需改动)
|
||||||
- `stock_his_pro` → `/api/stockbasic/`(`getStockHist()`、`recentPrice()`)
|
- 5 个房地产/资金流向页面使用本地 DB 但无 API 可替
|
||||||
- `stock_all_pro` → `/api/stockinfo/`(`tscodeToName()`)
|
- 1 个(stockkeydata.php)可用 `/api/finance/` 替代
|
||||||
- `index_hist_pro` → `/api/indexDatas/`(`getIndexData()`)
|
- 1 个(stockTradeRecord.php)私人交易数据不可替代
|
||||||
- 所有替换不保留 DB 回退,API 不可用时函数返回空值
|
|
||||||
|
|
||||||
4. **数据库表文档**
|
4. **Git 提交**
|
||||||
- `DB_REFERENCE.md` 持续更新,标记已替换表状态
|
- 本地 commit: `742bed2`(修复多余括号 & 重构研究报告卡片)
|
||||||
|
- **推送失败**:GitHub 未配置认证
|
||||||
|
|
||||||
## 当前工作
|
## 当前工作
|
||||||
|
|
||||||
无进行中的任务。
|
- `stockkeydata.php` 可改由 `/api/finance/` 替代,待用户确认后执行
|
||||||
|
|
||||||
## 未完成
|
## 未完成
|
||||||
|
|
||||||
- `moneyflow_hsgt_pro/ext`、`estate_*` 等表数据陈旧但无 API 可替,维持现状
|
- GitHub 推送阻塞,需先 `gh auth login` 完成认证
|
||||||
- 无 PHP 本地运行环境,语法检查在部署服务器执行
|
- `moneyflow_hsgt_pro/ext`、`estate_*` 数据陈旧但无 API 可替,维持现状
|
||||||
|
|
||||||
## 关键设计决策
|
## 关键设计决策
|
||||||
|
|
||||||
- 所有第三方库统一到 `lib/` 目录,按 `库名-版本号` 命名,字体不重命名
|
- 研究报告卡片改为按日期子目录动态扫描,不再硬编码文件列表
|
||||||
- `stock_his_pro`、`stock_all_pro`、`index_hist_pro` 三张表的数据来源切换为 API.doorcome.cn,本地 DB 查询代码已删除
|
|
||||||
- Google Fonts 本地化:字体文件存储于 `lib/webfonts/google/`,CSS 文件 `lib/css/google-fonts-extended.css`
|
|
||||||
|
|
||||||
## 下一步
|
## 下一步
|
||||||
|
|
||||||
由用户指定。
|
1. 执行 `gh auth login` 完成 GitHub 认证
|
||||||
|
2. 推送 commit 到 remote
|
||||||
|
3. 确认是否执行 stockkeydata.php 的 `/api/finance/` 替换
|
||||||
+58
-58
@@ -136,64 +136,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 房地产数据卡片 -->
|
|
||||||
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
|
||||||
<div class="flex items-center mb-6">
|
|
||||||
<div class="w-10 h-10 rounded-full bg-secondary/10 flex items-center justify-center mr-3">
|
|
||||||
<i class="fa-solid fa-home text-secondary"></i>
|
|
||||||
</div>
|
|
||||||
<h3 class="text-lg font-semibold">房地产数据分析</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-4 text-gray-600">
|
|
||||||
<p>以下数据主要聚焦于宁波地区房地产市场动态,包括挂牌数量、成交量等趋势分析。</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="space-y-3">
|
|
||||||
<a href="https://echart.doorcome.cn/charts/realestate.php" target="_blank"
|
|
||||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
|
||||||
<i class="fa-solid fa-building text-blue-500 w-6"></i>
|
|
||||||
<span>房地产挂牌数量趋势(宁波)</span>
|
|
||||||
</a>
|
|
||||||
<a href="https://echart.doorcome.cn/charts/estateNewTradeDaily.php" target="_blank"
|
|
||||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
|
||||||
<i class="fa-solid fa-key text-green-500 w-6"></i>
|
|
||||||
<span>新房每日成交量(宁波)</span>
|
|
||||||
</a>
|
|
||||||
<a href="https://echart.doorcome.cn/charts/estateTradeDaily.php" target="_blank"
|
|
||||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
|
||||||
<i class="fa-solid fa-exchange-alt text-yellow-500 w-6"></i>
|
|
||||||
<span>二手房每日成交量(宁波)</span>
|
|
||||||
</a>
|
|
||||||
<a href="https://echart.doorcome.cn/charts/estateListDaily.php" target="_blank"
|
|
||||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
|
||||||
<i class="fa-solid fa-list-alt text-purple-500 w-6"></i>
|
|
||||||
<span>二手房每日挂牌量(宁波)</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="mt-8 bg-blue-50 p-4 rounded-lg border border-blue-100">
|
|
||||||
<div class="flex items-start">
|
|
||||||
<i class="fa-solid fa-info-circle text-blue-500 mt-1 mr-3"></i>
|
|
||||||
<div>
|
|
||||||
<h4 class="font-medium text-blue-800 mb-1">数据更新说明</h4>
|
|
||||||
<p class="text-blue-700 text-sm">所有房地产数据每日凌晨自动更新,股票和指数数据在交易日收盘后2小时内更新。</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 宏观研究数据卡片 -->
|
|
||||||
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
|
||||||
<div class="flex items-center mb-4">
|
|
||||||
<div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
|
|
||||||
<i class="fa-solid fa-chart-bar text-indigo-600"></i>
|
|
||||||
</div>
|
|
||||||
<h3 class="text-lg font-semibold">宏观研究</h3>
|
|
||||||
</div>
|
|
||||||
<p class="text-gray-600 text-sm mb-4">宏观量化分析报告,包含量化日报等研究内容。</p>
|
|
||||||
<a href="/quant/" class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors text-sm font-medium">
|
|
||||||
查看报告 <i class="fa-solid fa-arrow-right ml-2"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<!-- 研究报告数据卡片 -->
|
<!-- 研究报告数据卡片 -->
|
||||||
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
||||||
<div class="flex items-center mb-4">
|
<div class="flex items-center mb-4">
|
||||||
@@ -252,6 +194,64 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 宏观研究数据卡片 -->
|
||||||
|
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
||||||
|
<div class="flex items-center mb-4">
|
||||||
|
<div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
|
||||||
|
<i class="fa-solid fa-chart-bar text-indigo-600"></i>
|
||||||
|
</div>
|
||||||
|
<h3 class="text-lg font-semibold">宏观研究</h3>
|
||||||
|
</div>
|
||||||
|
<p class="text-gray-600 text-sm mb-4">宏观量化分析报告,包含量化日报等研究内容。</p>
|
||||||
|
<a href="/quant/" class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors text-sm font-medium">
|
||||||
|
查看报告 <i class="fa-solid fa-arrow-right ml-2"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<!-- 房地产数据卡片 -->
|
||||||
|
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
||||||
|
<div class="flex items-center mb-6">
|
||||||
|
<div class="w-10 h-10 rounded-full bg-secondary/10 flex items-center justify-center mr-3">
|
||||||
|
<i class="fa-solid fa-home text-secondary"></i>
|
||||||
|
</div>
|
||||||
|
<h3 class="text-lg font-semibold">房地产数据分析</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4 text-gray-600">
|
||||||
|
<p>以下数据主要聚焦于宁波地区房地产市场动态,包括挂牌数量、成交量等趋势分析。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-3">
|
||||||
|
<a href="https://echart.doorcome.cn/charts/realestate.php" target="_blank"
|
||||||
|
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||||
|
<i class="fa-solid fa-building text-blue-500 w-6"></i>
|
||||||
|
<span>房地产挂牌数量趋势(宁波)</span>
|
||||||
|
</a>
|
||||||
|
<a href="https://echart.doorcome.cn/charts/estateNewTradeDaily.php" target="_blank"
|
||||||
|
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||||
|
<i class="fa-solid fa-key text-green-500 w-6"></i>
|
||||||
|
<span>新房每日成交量(宁波)</span>
|
||||||
|
</a>
|
||||||
|
<a href="https://echart.doorcome.cn/charts/estateTradeDaily.php" target="_blank"
|
||||||
|
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||||
|
<i class="fa-solid fa-exchange-alt text-yellow-500 w-6"></i>
|
||||||
|
<span>二手房每日成交量(宁波)</span>
|
||||||
|
</a>
|
||||||
|
<a href="https://echart.doorcome.cn/charts/estateListDaily.php" target="_blank"
|
||||||
|
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||||
|
<i class="fa-solid fa-list-alt text-purple-500 w-6"></i>
|
||||||
|
<span>二手房每日挂牌量(宁波)</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="mt-8 bg-blue-50 p-4 rounded-lg border border-blue-100">
|
||||||
|
<div class="flex items-start">
|
||||||
|
<i class="fa-solid fa-info-circle text-blue-500 mt-1 mr-3"></i>
|
||||||
|
<div>
|
||||||
|
<h4 class="font-medium text-blue-800 mb-1">数据更新说明</h4>
|
||||||
|
<p class="text-blue-700 text-sm">所有房地产数据每日凌晨自动更新,股票和指数数据在交易日收盘后2小时内更新。</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user