73 Commits
Author SHA1 Message Date
OG Backup 911ef2ce2c Merge branch 'main' of https://git.20031227.de5.net/og/Socket 2026-06-14 14:21:35 +08:00
OG Backup 2cd31285f0 backup: 线上最终版本全量备份
包含所有线上运行的改动:
- 荷官端倒计时卡顿修复(CountdownService TTL+10/前端watchdog)
- 停止下注debounce防重复(8个handle.js)
- 洗码量规则重写(单边/双边/开和不计/百家乐+龙虎)
- 龙虎和局不杀庄闲(全额退回)
- 日志系统(Logger工具类/日志查看/清理脚本)
- 好路提醒异常处理(WaybillRemindService try-catch)
- 扫牌器连接改进(ScanConnectService)
- 牛牛/三卡开牌修复
- .gitignore更新/.DS_Store清理
2026-06-14 14:20:43 +08:00
fengshao1227 73a8847ceb docs: 洗码量计算规则文档(客户2026-05-28确认的完整规则) 2026-05-29 06:14:20 +08:00
fengshao1227 e44d645547 fix: 洗码量按客户完整规则重写
百家乐+龙虎:
- 单边洗码(type_xima=2):输口计洗码,开和不计
- 双边洗码(type_xima=1):所有投注都计洗码,开和不计(庄闲退回部分除外)
- 龙虎和局不杀龙虎,全额退回
2026-05-29 05:37:40 +08:00
fengshao1227 c3621121ca fix: 龙虎洗码量改为所有输口之和,和局通杀龙虎计入洗码 2026-05-28 18:04:53 +08:00
fengshao1227 477ca7f6c9 fix: 百家乐洗码量改为所有输口投注额之和
原逻辑只算庄/闲的投注额,对子、和、幸运6、大小的输口不计入。
改为:所有输的位置的投注额都计入洗码量(庄、闲、和、庄对、闲对、幸运6、大小)。
2026-05-28 18:03:35 +08:00
testadmin 8edc071997 fix: 倒计时卡住根因修复 — Redis TTL缓冲+前端watchdog兜底
根因:CountdownService用while(sleep(1))阻塞循环推送倒计时,
Redis key TTL=wait_time,3台同时运行时worker争用导致循环慢于
Redis过期时间,key先过期→循环中断→倒计时冻结在当前秒数。

修复:
1. Redis TTL加10秒缓冲(waitTime+10),防止key提前过期
2. 前端加watchdog兜底:服务端2秒没推送就本地继续倒计时
2026-05-19 14:25:48 +08:00
testadmin aa74a6edc1 fix: 荷官端卡住根因修复 — endBet防抖+状态同步+WaybillRemind越界
1. end_bet_error翻译从'停止成功'改为'已停止下注'(误导荷官以为操作成功)
2. endBet()加2秒防抖,防止连按Enter导致重复请求
3. Numpad 0加状态守卫,只在bet_status=1时才调endBet
4. endBet失败时前端自动同步服务端bet_status,不再弹错误框
5. 后端end_bet_error响应附带当前bet_status供前端同步
6. WaybillRemindService路子珠pattern检测加try-catch,消除每日59次offset -1错误
2026-05-19 00:28:02 +08:00
testadmin f3fb7628ab fix: Enter key at bet_status=1 now calls endBet() instead of silently ignoring
When endBet fails on server, client stays stuck at status=1 where Enter
key did nothing. Dealer had to void the round to recover. Now Enter at
status=1 triggers endBet(), allowing manual recovery without voiding.
2026-05-18 21:06:07 +08:00
testadmin cd149d5478 fix: add 3s debounce to opening() across all 8 dealer JS files 2026-05-17 12:16:54 +08:00
testadmin 3533758405 fix: 'Please hold on' → '请稍等' across all 8 dealer JS files 2026-05-17 12:13:50 +08:00
testadmin 444235b393 style: dragon 7 bead road circle border lineWidth 3→4 2026-05-16 16:41:07 +08:00
testadmin 3bac9960b8 refine: normalize bet log names and init_table_fail level 2026-05-14 11:50:59 +08:00
testadmin a180fe8385 feat: complete logging audit - fill all gaps
- Filter noisy audio play() errors from frontend log
- Add logging to ALL 8 ToBet services (was only Baccarat)
- Add InitTableService logging (Sumday/Boot/NumberTab creation & failure)
- Add logview.sh for quick log viewing
- Add log_cleanup.sh for 30-day rotation
2026-05-14 11:49:36 +08:00
testadmin 7fe15a0d50 fix: unify log path to runtime/log/ for all contexts
- Logger: use root_path()/runtime/log/ instead of runtime_path()/log/
  (runtime_path() returns app-specific path in multi-app mode)
- Remove debug output from Log controller
2026-05-14 11:44:57 +08:00
testadmin cbe48e938a debug: return runtime path and data keys 2026-05-14 11:43:53 +08:00
testadmin 8ac5d159ad fix: remove global route that was intercepting log/report controller 2026-05-14 11:42:50 +08:00
testadmin b733eab816 debug: add error catching to log endpoint 2026-05-14 11:41:58 +08:00
testadmin df6aa119a0 fix: use getContent() for JSON body parsing in log endpoint 2026-05-14 11:40:54 +08:00
testadmin 966b3133bf fix: parse JSON body in log report endpoint 2026-05-14 11:38:59 +08:00
testadmin 817e262140 fix: frontend error reporting route - bypass auth middleware
- Create handle/controller/Log.php (no auth) for dealer error reports
- Update error-report.js URL: /index/log_report → /log/report
- index app already has Log controller at /log/report
2026-05-14 11:37:58 +08:00
testadmin 3766975897 chore: remove .magi from tracking 2026-05-14 11:35:42 +08:00
testadmin b518578266 feat: complete logging coverage - all services + frontend route fix
Backend additions:
- UserConnectService, ScanConnectService: connection logging
- ToBetCommonService, ToBetBaccaratService: bet rejection/success logging
- ResetBoot, ResetNumberTab, ResetBaccarat, ResetDt: reset event logging
- handle/Index: log_report controller method (fixes route for dealer端)
- index/Log: log_report controller for player端 (no auth required)

Frontend:
- error-report.js: fix report URL to /index/log_report (matches handle controller)

Total: 21 backend files with 60 Logger calls across 5 categories
2026-05-14 11:35:34 +08:00
testadmin d77c6beac7 feat: add logging module for backend + frontend error reporting
Backend:
- New Logger utility (app/utils/Logger.php) with category-based log files
  (connect/game/bet/error/frontend under runtime/log/)
- Log WebSocket connect/close events (WsConnect, WsClose)
- Log dealer auth success/failure (SpaceConnectService)
- Log all game events: startBet, endBet, changeBoot, opening for all 7 game types
- Log unhandled exceptions (ExceptionHandle)
- Separate SQL/error logs via apart_level, enable realtime_write for Swoole
- Add /log/report POST endpoint for frontend error ingestion

Frontend:
- New error-report.js with window.onerror + unhandledrejection auto-reporting
- Added to all 12 dealer HTML templates
- Bump VERSION_V to v10.1.0
2026-05-14 11:28:33 +08:00
testadmin 710bb45614 fix: handle.js syntax error causing niuniu dealer page crash
- Line 1953: `ctb.{strokeStyle = "#ff2202";}` → `ctb.strokeStyle = "#ff2202";`
  This typo from Dragon 7 bead road styling broke the entire JS parser
- Bump VERSION_V to v10.0.9 to force browser cache refresh
2026-05-14 11:15:02 +08:00
testadmin 0f571f21ec fix: 修改结果龙7归庄、熊8归闲(之前写反了) 2026-05-13 19:22:47 +08:00
testadmin ef66019c29 feat: 修改上局结果支持幸运6/龙7/熊8
- tab_b.html: 下拉菜单加6/7/8选项(5段格式 opening-pair-luck_six-dragon_seven-panda_eight)
- handle_b.js: retreated()解析并传dragon_seven/panda_eight
- NumberTab: resetBaccarat更新luck_six/dragon_seven/panda_eight字段
- ResetBaccaratService: 比较条件加上三个字段
2026-05-13 19:09:43 +08:00
testadmin 3e1896ea1c feat: 龙7红圈加粗 2026-05-13 18:41:05 +08:00
testadmin abf608582a chore: 版本号v10.0.7强制刷新荷官端缓存 2026-05-13 18:16:09 +08:00
testadmin a0a4ca396f feat: 龙7路子珠描边改红色圈 2026-05-13 16:10:18 +08:00
testadmin 139d89e029 fix: showPngDt改用#resultAreaImg输出HTML(龙虎结果不显示的根因) 2026-05-11 17:07:15 +08:00
testadmin 8de661ad8b fix: resize时ludan未初始化导致CanvasTable崩溃,加空值保护 2026-05-11 16:03:48 +08:00
testadmin cf9800b74a fix: common.php 强制加载中文语言包,解决Swoole环境lang()返回key的问题 2026-05-11 15:54:12 +08:00
testadmin 081f6f111f revert: 回滚 extend_list 配置,app() 在 config 阶段未初始化会导致异常 2026-05-11 15:16:13 +08:00
testadmin ce03e0bb15 fix: extend_list强制加载语言包,确保Swoole环境下也能加载翻译 2026-05-11 15:00:38 +08:00
testadmin e9b3fde30e fix: lang文件放到app/lang/目录(TP6初始化从appPath=app/加载,不是app/handle/) 2026-05-11 14:54:17 +08:00
testadmin 7c1fee312f fix: 添加荷官端中文语言包(从Pro复制),防止翻译丢失 2026-05-11 14:37:07 +08:00
testadmin 71d28ef630 chore: .gitignore 加入 vendor/runtime/.DS_Store,清理 git 索引 2026-05-11 14:13:05 +08:00
testadmin 5b74fee7a8 fix: 龙虎手动模式(tab_dt.html)补上#resultAreaTimer/#resultAreaImg 2026-05-11 14:05:30 +08:00
testadmin ba687cfb57 fix: 所有游戏荷官端统一改造倒计时/结果显示
- handle.js: 移除所有.countdown操作,改用#resultAreaTimer
- handle.js: showPng/showPngDt改为HTML文字(庄对红/闲对蓝)
- common.css: 加.countdown/.result-box隐藏规则
- tab_nn/tab_knn/tab_toning/tab_b_auto/tab_dt_auto: 加#resultAreaTimer/#resultAreaImg
- 版本号 v10.0.4 → v10.0.5
2026-05-11 14:02:31 +08:00
testadmin 207f742770 fix: 开牌结果改用HTML文字显示,庄对红色/闲对蓝色
- showPng()不再用PNG图片,改为HTML文字渲染
- 庄对永远红色(#b20a00),闲对永远蓝色(#0543bc)
- 版本号 v10.0.3 → v10.0.4
2026-05-06 15:48:03 +08:00
testadmin 3104243f5c chore: 版本号 v10.0.2 → v10.0.3 强制客户端刷新缓存 2026-05-06 11:24:10 +08:00
testadmin 5bf3682657 fix: 修复路子珠椭圆变形+右侧面板样式补全
- canvas 去掉 CSS width/height:100% 防止拉伸变形
- .result-area/.result-area-timer 样式移入 index_tab.css(tab_b.html 不加载 common.css)
- 加大计时器(7vw)和结果图(14vh)显示尺寸
- .result-box(旧弹窗)加 display:none !important
2026-05-06 11:02:46 +08:00
testadmin 78797462b5 fix: 荷官端倒计时改用右侧面板显示,路子珠描边色统一调暗
- handle_b.js: 移除所有 .countdown 大字覆盖操作,统一用 #resultAreaTimer
- index_tab.css: .countdown display:none !important 彻底隐藏
- 所有 handle JS: 幸运6描边 #a03030(暗红)、龙7 #c9980a(暗黄)、熊8 #506878(灰蓝)
2026-05-05 23:37:37 +08:00
testadmin 307338fa7d feat: 计时/开牌结果移到右侧面板(限红区旁边)
- tab_b.html: limit-box 和 result-area 并排布局
- CSS: 隐藏原始大 overlay,结果在右侧面板显示
- JS: countDown/showPng 同步更新到 #resultAreaTimer/#resultAreaImg
2026-05-05 23:01:16 +08:00
testadmin 6e526d1678 feat: 荷官端布局调整 - 统计区缩小/限红区放大/结果显示移至右下
- 统计区(.title/.top) 字体 18→13px,行高缩小
- 限红区(.limit-box) 字体 14→16px,间距加大
- 倒计时(.countdown) 移到右下角 bottom:22vh,缩小 6vw
- 开牌结果(.result-box) 移到右下角 bottom:2vh,宽度 12vw
2026-05-05 22:51:21 +08:00
testadmin 6768684116 fix: 路子珠特殊图标颜色调整
- 幸运6: 绿色→暗红色(#8b1a1a)
- 龙7: 金色→暗黄色(#b8860b)
- 熊8: 亮蓝→墨蓝色(#34495e)
2026-05-05 22:35:11 +08:00
testadmin 510802551c fix: handle_b.js 路子珠修正(tab_baccarat 实际加载的JS)
根因:tab_b.html 加载 handle_b.js(不是 handle.js)
- 字段名 lucky_six → luck_six(匹配 Waybill 返回)
- 判断值 ==1 → >0(后端存 2/3 不是 1)
- 补加 dragon_seven/panda_eight
2026-05-02 01:11:29 +08:00
testadmin 231f6eff25 debug: waybill 返回数据 console.log 2026-05-02 01:02:22 +08:00
testadmin 837030cf4f fix: handle.js(tab_baccarat用的JS)补加路子珠特殊图标 2026-05-02 00:44:59 +08:00