feat(history): 添加历史数据管理功能和数据分析图表
- 在addons.php中添加example模块路由配置 - 新增application/config.php配置文件,包含应用设置、数据库配置等 - 实现dashboard.js仪表盘功能,包含冷热号码分析、比例分析图表 - 添加history.js历史数据管理功能,支持号码查询和统计分析 - 集成echarts图表库实现数据可视化展示 - 添加号码颜色映射和生肖映射功能 - 实现号码球样式格式化显示 - 添加遗漏号码、走势图、冷热分析等数据分析功能
This commit is contained in:
@@ -43,13 +43,34 @@ define(['jquery'], function ($) {
|
||||
|
||||
var html = '';
|
||||
|
||||
// 热号:按次数降序取前5名
|
||||
var hotAll = hc.all.slice().sort(function (a, b) { return b.count - a.count; });
|
||||
var hotTop5 = hotAll.slice(0, 5);
|
||||
// 冷号:按次数升序取前5名,第5名有并列则全部包含
|
||||
var coldAll = hc.all.slice().sort(function (a, b) { return a.count - b.count; });
|
||||
var coldList = coldAll.slice(0, 5);
|
||||
if (coldList.length >= 5) {
|
||||
var threshold = coldList[4].count;
|
||||
var rest = coldAll.slice(5);
|
||||
for (var k = 0; k < rest.length; k++) {
|
||||
if (rest[k].count === threshold) coldList.push(rest[k]);
|
||||
else break;
|
||||
}
|
||||
}
|
||||
|
||||
html += '<div class="dash-section"><h4>🔥❄️ 冷热号码</h4><div class="row">';
|
||||
html += '<div class="col-sm-6"><div class="dash-card" style="border-left:3px solid #e74c3c;"><div style="color:#e74c3c;font-weight:bold;margin-bottom:8px;">热号 Top 5</div>';
|
||||
for (var i = 0; i < 5; i++) html += ball(hc.hot[i].num, hc.hot[i].color) + ' ';
|
||||
html += '</div></div>';
|
||||
html += '<div class="col-sm-6"><div class="dash-card" style="border-left:3px solid #3498db;"><div style="color:#3498db;font-weight:bold;margin-bottom:8px;">冷号 Top 5</div>';
|
||||
for (var i = 0; i < 5; i++) html += ball(hc.cold[i].num, hc.cold[i].color) + ' ';
|
||||
html += '</div></div></div></div>';
|
||||
html += '<div style="display:flex;flex-wrap:wrap;">';
|
||||
for (var i = 0; i < hotTop5.length; i++) {
|
||||
html += '<span style="flex:0 0 20%;text-align:center;margin-bottom:4px;">' + ball(hotTop5[i].num, hotTop5[i].color) + '<br><span style="font-size:11px;color:#999;">' + hotTop5[i].count + '次</span></span>';
|
||||
}
|
||||
html += '</div></div></div>';
|
||||
html += '<div class="col-sm-6"><div class="dash-card" style="border-left:3px solid #3498db;"><div style="color:#3498db;font-weight:bold;margin-bottom:8px;">冷号</div>';
|
||||
html += '<div style="display:flex;flex-wrap:wrap;">';
|
||||
for (var i = 0; i < coldList.length; i++) {
|
||||
html += '<span style="flex:0 0 20%;text-align:center;margin-bottom:4px;">' + ball(coldList[i].num, coldList[i].color) + '<br><span style="font-size:11px;color:#999;">' + coldList[i].count + '次</span></span>';
|
||||
}
|
||||
html += '</div></div></div></div></div>';
|
||||
|
||||
html += '<div class="dash-section"><h4>📊 比例分析</h4><div class="row">';
|
||||
html += '<div class="col-sm-4"><div class="dash-card"><div id="colorwave-chart" style="width:100%;height:200px;"></div></div></div>';
|
||||
|
||||
Reference in New Issue
Block a user