feat(phase-4 to 10): add all remaining analysis features - color wave, zodiac, odd/even, big/small, sum, consecutive, tail numbers

This commit is contained in:
2026-04-21 23:46:12 +08:00
parent f36410dcc6
commit 8ed4837992
5 changed files with 681 additions and 2 deletions
+126 -1
View File
@@ -22,7 +22,7 @@ class History extends Backend
* 无需额外权限检查的方法(但仍在 admin 模块内,需要 admin 登录)
* @var array
*/
protected $noNeedRight = ['missingNum', 'trendData', 'hotColdNumbers'];
protected $noNeedRight = ['missingNum', 'trendData', 'hotColdNumbers', 'colorWaveAnalysis', 'zodiacAnalysis', 'oddEvenAnalysis', 'bigSmallAnalysis', 'sumAnalysis', 'consecutiveNumbers', 'tailNumbers'];
public function _initialize()
{
@@ -92,5 +92,130 @@ class History extends Backend
}
}
/**
* 波色分析
*/
public function colorWaveAnalysis()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$type = $this->request->get('type', 'all');
if (!in_array($type, ['all', 'special'])) {
$this->error('查询类型不正确');
}
$result = $this->model->getColorWaveAnalysis($periods, $type);
$this->success('查询成功', null, $result);
}
}
/**
* 生肖分析
*/
public function zodiacAnalysis()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$type = $this->request->get('type', 'all');
if (!in_array($type, ['all', 'special'])) {
$this->error('查询类型不正确');
}
$result = $this->model->getZodiacAnalysis($periods, $type);
$this->success('查询成功', null, $result);
}
}
/**
* 奇偶分析
*/
public function oddEvenAnalysis()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$type = $this->request->get('type', 'all');
if (!in_array($type, ['all', 'special'])) {
$this->error('查询类型不正确');
}
$result = $this->model->getOddEvenAnalysis($periods, $type);
$this->success('查询成功', null, $result);
}
}
/**
* 大小分析
*/
public function bigSmallAnalysis()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$type = $this->request->get('type', 'all');
if (!in_array($type, ['all', 'special'])) {
$this->error('查询类型不正确');
}
$result = $this->model->getBigSmallAnalysis($periods, $type);
$this->success('查询成功', null, $result);
}
}
/**
* 和值分析
*/
public function sumAnalysis()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$result = $this->model->getSumAnalysis($periods);
$this->success('查询成功', null, $result);
}
}
/**
* 连号分析
*/
public function consecutiveNumbers()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$result = $this->model->getConsecutiveNumbers($periods);
$this->success('查询成功', null, $result);
}
}
/**
* 尾数分析
*/
public function tailNumbers()
{
if ($this->request->isAjax()) {
$periods = $this->request->get('periods', 30, 'intval');
if ($periods < 10 || $periods > 100) {
$this->error('期数范围必须在 10-100 之间');
}
$type = $this->request->get('type', 'all');
if (!in_array($type, ['all', 'special'])) {
$this->error('查询类型不正确');
}
$result = $this->model->getTailNumbers($periods, $type);
$this->success('查询成功', null, $result);
}
}
}