fix(history): 重构特码冷热功能 — 改为弹窗列表展示每期相对于前N期的冷热状态

改为批量查询模式:每期特码相对于它前面N期的出现频率判定冷热
弹窗内以表格形式展示所有期号、特码球、冷热标签、次数、排名
支持调整向前期数(10-100),打开弹窗自动查询
This commit is contained in:
2026-04-24 20:06:37 +08:00
parent efdef3798e
commit 9881f75e59
5 changed files with 187 additions and 199 deletions
+5 -8
View File
@@ -237,23 +237,20 @@ class History extends Backend
}
/**
* 特码冷热查询(指定期号向前y期判定
* 特码冷热列表(每期相对于前N期的冷热状态
*/
public function specialHotColdAction()
{
if ($this->request->isAjax()) {
$expect = $this->request->get('expect', '');
if (empty($expect)) {
$this->error('请输入期号');
}
$lookback = $this->request->get('lookback', 30, 'intval');
if ($lookback < 10 || $lookback > 100) {
$this->error('向前期数范围必须在 10-100 之间');
}
$result = $this->model->getSpecialHotColdByExpect($expect, $lookback);
if ($result === false) {
$this->error('未找到该期号数据');
$limit = $this->request->get('limit', 100, 'intval');
if ($limit < 10 || $limit > 200) {
$this->error('查询期数范围必须在 10-200 之间');
}
$result = $this->model->getSpecialHotColdList($lookback, $limit);
$this->success('查询成功', null, $result);
}
}