Files
amlhc/.planning/quick/260502-ljh-history/260502-ljh-SUMMARY.md
T

1.1 KiB

title, mode, status, date
title mode status date
在history页面新增一个弹窗,显示:下一期尾数与前一期尾数相同的概率、下一期首位与前一期首位相同的概率 quick complete 2026-05-02

Summary

Completed quick task: Added a "尾首概率" (Tail-Head Probability) dialog to the history page.

Changes

  • application/admin/model/History.php — Added getTailHeadProbability() method that analyzes consecutive period transitions of the special code (num7), calculating the probability of tail (ones digit) and head (tens digit) remaining the same
  • application/admin/controller/History.php — Added tailHeadProb endpoint + added to $noNeedRight
  • application/admin/view/history/index.html — Added toolbar button with btn-tailheadprob class
  • public/assets/js/backend/history.js — Added click handler + showTailHeadProbabilityDialog() with period selector (30/50/100/200)

Implementation details

  • Tail = num % 10 (个位), Head = floor(num / 10) (十位)
  • Only counts valid transitions (both numbers in 1-49 range)
  • Displays probability as percentage with period count and transition count