refactor: 全面代码重构与项目结构整理
安全性: - 所有SQL查询改用参数化查询(db_query),防止SQL注入 - TUSHARE_API_TOKEN集中到config.php常量,移除硬编码和多份拷贝 - getBasic.inc.php中$_REQUEST输出到JS时添加htmlspecialchars转义 代码组织: - 21个页面文件移至charts/子目录,根目录仅保留入口文件 - ajax.inc.php拆分:esfTradeDaily/esfListDaily迁至getEstate.inc.php - getBasic.inc.php拆分:HTML组件函数迁至新建的widgets.inc.php - 前端依赖去重:移除lib/echarts.min.js、libai/3.4.16.js、research/js/3.4.16.js 规范化: - AJAX响应格式统一为jsonResponse()标准封装 - 前端全局变量统一为window.chartConfig对象模式 - 修复PHP 8.4 Deprecated警告(getEstateData、getStockHistoryDataByTS参数顺序) - html/head.php中jQuery/CSS路径改为绝对路径,修复charts/子目录加载问题 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+15
-15
@@ -82,32 +82,32 @@
|
||||
</div>
|
||||
|
||||
<div class="space-y-3">
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/stock_trend.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/stock_trend.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-arrow-trend-up text-primary w-6"></i>
|
||||
<span>股价VS PE/PB/PS 趋势</span>
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/stockep.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/stockep.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-balance-scale text-secondary w-6"></i>
|
||||
<span>股价VS EP</span>
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/stockmargin.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/stockmargin.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-money-bill-wave text-green-500 w-6"></i>
|
||||
<span>股价VS 融资融券余额</span>
|
||||
</a>
|
||||
<!--<a href="#" onclick="openurl('https://echart.doorcome.cn/hkholdbycode.php');"
|
||||
<!--<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/hkholdbycode.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-globe-asia text-blue-500 w-6"></i>
|
||||
<span>股价VS 北向资金持股</span>-->
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/stock_ih.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/stock_ih.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-building-columns text-purple-500 w-6"></i>
|
||||
<span>股价VS 机构持仓趋势</span>
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/stockkeydata.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/stockkeydata.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-table text-yellow-500 w-6"></i>
|
||||
<span>个股基本面数据</span>
|
||||
@@ -117,27 +117,27 @@
|
||||
<div class="mt-6 pt-6 border-t border-gray-200">
|
||||
<h4 class="font-medium mb-3">指数分析</h4>
|
||||
<div class="space-y-3">
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/index_trend.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/index_trend.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-chart-area text-indigo-500 w-6"></i>
|
||||
<span>指数VS PE/PB/PS/市值 趋势</span>
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/index_ih.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/index_ih.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-institution text-teal-500 w-6"></i>
|
||||
<span>指数VS 机构持仓趋势</span>
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/index_mv_all.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/index_mv_all.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-chart-pie text-orange-500 w-6"></i>
|
||||
<span>指数VS 两市总市值</span>
|
||||
</a>
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/index_margin.php');"
|
||||
<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/index_margin.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-bank text-red-500 w-6"></i>
|
||||
<span>指数VS 融资余额</span>
|
||||
</a>
|
||||
<!--<a href="#" onclick="openurl('https://echart.doorcome.cn/moneyflow.php');"
|
||||
<!--<a href="#" onclick="openurl('https://echart.doorcome.cn/charts/moneyflow.php');"
|
||||
class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
<i class="fa-solid fa-exchange text-pink-500 w-6"></i>
|
||||
<span>指数VS 沪深港通资金流向</span>
|
||||
@@ -160,22 +160,22 @@
|
||||
</div>
|
||||
|
||||
<div class="space-y-3">
|
||||
<a href="https://echart.doorcome.cn/realestate.php" target="_blank"
|
||||
<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/estateNewTradeDaily.php" target="_blank"
|
||||
<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/estateTradeDaily.php" target="_blank"
|
||||
<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/estateListDaily.php" target="_blank"
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user