feat(history): 新增特码冷热查询功能 — 选定某一期向前y期判定冷热号
在history页面添加「特码冷热」按钮,用户可选择指定期号并设定向前期数 系统统计该期特码在向前范围内的出现频率,与平均值对比判定冷/温/热号
This commit is contained in:
@@ -22,7 +22,7 @@ class History extends Backend
|
||||
* 无需额外权限检查的方法(但仍在 admin 模块内,需要 admin 登录)
|
||||
* @var array
|
||||
*/
|
||||
protected $noNeedRight = ['missingNum', 'trendData', 'hotColdNumbers', 'colorWaveAnalysis', 'zodiacAnalysis', 'oddEvenAnalysis', 'bigSmallAnalysis', 'specialTrend', 'consecutiveNumbers', 'tailNumbers', 'dashboard', 'specialHeatmap'];
|
||||
protected $noNeedRight = ['missingNum', 'trendData', 'hotColdNumbers', 'colorWaveAnalysis', 'zodiacAnalysis', 'oddEvenAnalysis', 'bigSmallAnalysis', 'specialTrend', 'consecutiveNumbers', 'tailNumbers', 'dashboard', 'specialHeatmap', 'specialHotColdAction'];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
@@ -236,6 +236,28 @@ class History extends Backend
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 特码冷热查询(指定期号向前y期判定)
|
||||
*/
|
||||
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('未找到该期号数据');
|
||||
}
|
||||
$this->success('查询成功', null, $result);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 特码热力图
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user