From 2855cb51ca2a5b1f719a948f834058517c0a878d Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 12 Aug 2026 15:08:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(news=5Freports):=20=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E6=96=B0=E9=97=BB=E6=BA=90=20source?= =?UTF-8?q?s=20+=20=E9=A1=B5=E9=9D=A2=E5=BA=95=E9=83=A8=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /api/news/events/ 事件行: sources 字段非空时显示多个新闻源, 为空回退 source 单源 (兼容数组/对象/JSON 字符串) - footer 参考 index-2.php 深色样式, 增加 page_counter 访问计数 - 文档: AGENTS.md/CLAUDE.md 更新表数量 16->18 张, 补充 news_report/news_event 说明 --- AGENTS.md | 7 ++++--- CLAUDE.md | 2 +- charts/news_reports.php | 18 +++++++++++++++--- js/newsReports.js | 21 ++++++++++++++++++++- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index c0a0124..a0d96e3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -76,10 +76,10 @@ $_REQUEST['t'] = 'stockList'; ## 数据库表名约定 -完整清单见 `DB_REFERENCE.md`(16 张表、在用/未用/已被 API 替代状态一目了然)。要点: +完整清单见 `DB_REFERENCE.md`(18 张表、在用/未用/已被 API 替代状态一目了然)。要点: - **已被 API 替代、代码不再直接引用**:`index_hist_pro`(指数行情)、`stock_his_pro`(个股行情)、`stock_all_pro`(代码↔名称)——对应数据走 `api.doorcome.cn` 的 `indexDatas` / `stockbasic` / `stockinfo` 等端点。 -- **在用**:`moneyflow_hsgt_pro`(沪深港通原始值)、`moneyflow_hsgt_pro_ext`(累积值)、`estate_json` / `estate_json_ext` / `estate_listing`(房地产)、`trade_record` / `trade_record_cj`(方正/长江证券交易记录)、`mac_report`(宏观研究,quant/ 用)、`pv_log` / `pv_counter`(访问日志)。 +- **在用**:`moneyflow_hsgt_pro`(沪深港通原始值)、`moneyflow_hsgt_pro_ext`(累积值)、`estate_json` / `estate_json_ext` / `estate_listing`(房地产)、`trade_record` / `trade_record_cj`(方正/长江证券交易记录)、`mac_report`(宏观研究,quant/ 用)、`pv_log` / `pv_counter`(访问日志)、`news_report` / `news_event`(投资资讯日报,由独立的 djapi 后端写入,本仓库前端 `charts/news_reports.php` 仅经 `/api/news/reports/`、`/api/news/events/` 只读消费)。 - **机构持仓在 `ih_by_ts_code_ext`**,但消费它的页面(`chartSix.php`、`chartThree.php`、`stock_ih.php`、`index_ih.php`)已全部移入 `deprecated/`,当前无活跃调用者;`getIhData()` / `getIhDataByStock()` 保留在 `inc/getData.inc.php`。 ## 注意事项 @@ -88,7 +88,8 @@ $_REQUEST['t'] = 'stockList'; - **没有鉴权机制** —— 这是内网或个人使用的系统,不需要添加登录/权限功能。 - **`deprecated/` 目录** —— 存放已废弃的旧版页面(`chartOne`~`chartSix`、`stock_ih`、`index_ih`、旧版 `stock_trend`/`index_trend` 等,部分仍用 `window.chartConfig` 模式),直接忽略,不要修改或引用。 - **`class/basic_info.class.php`** —— 独立的小类,未被核心流程引用。 -- **`news/` 和 `research/`** —— 独立的子模块,有自己的 JS/CSS 和设计文档,修改前先看对应的 `design.md` 和 `outline.md`。 +- **`news/`** —— 独立子模块(新闻抓取/分析,面向 CCTV 新闻联播),有自己的 JS/CSS,修改前先看 `design.md` 和 `outline.md`。 +- **`research/`** —— 股票/行业研究报告产物目录(HTML/PDF),修改前看 `intl_news_README.md`。 ## Checkpoint diff --git a/CLAUDE.md b/CLAUDE.md index 01170d4..079a810 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -36,7 +36,7 @@ - `upload.php` — 文件上传处理。 - `plansetup.php` — 用于 Composer autoload 的快捷入口(`__DIR__."/../vendor/autoload.php"`)。 -> 数据库表全量清单(16 张表、在用/未用/已由 API 替代状态)见根目录 `DB_REFERENCE.md`。 +> 数据库表全量清单(18 张表、在用/未用/已由 API 替代状态)见根目录 `DB_REFERENCE.md`。 ### 页面结构 diff --git a/charts/news_reports.php b/charts/news_reports.php index 67a581b..6773287 100644 --- a/charts/news_reports.php +++ b/charts/news_reports.php @@ -1,3 +1,4 @@ + @@ -222,10 +223,21 @@ -