Commit Graph
61 Commits
Author SHA1 Message Date
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
testadmin 1c666a22be fix: 路单查询补查 luck_six/dragon_seven/panda_eight 字段
根因:getByBootIdDone 只查 result,pair,新字段没传到 Waybill,前端拿不到数据
2026-05-02 00:02:58 +08:00
testadmin 39a1d0dea8 feat: 路子珠显示幸运6/龙7/熊8特殊图标
- DB: cg_number_tab 加 dragon_seven, panda_eight 列
- 后端: OpeningBaccaratService 接收并存储 dragon_seven/panda_eight
- Waybill: showRoad 数据含 luck_six/dragon_seven/panda_eight
- 前端 SoloPath: 绿色圆「6」=幸运6, 金色圆「7」=龙7, 蓝色圆「8」=熊8
- handle_b.js: 键盘7/8设置对应隐藏字段,opening()传参
2026-05-01 23:36:33 +08:00
testadmin b5a5641557 feat: 荷官端倒计时和开牌结果缩小移至右上角
- .countdown 从屏幕中央(28%/37%)移到右上角(8px),字体从13vw缩至4vw
- .result-box 从屏幕中央(40%/40%/320px)移到右上角(8px/120px)
- index_tab.css 同步调整(210px→80px, 60px→32px)
2026-05-01 22:09:36 +08:00
testadmin 17f9862515 feat: 百家乐荷官端键位重映射(匹配单机版布局)
- 庄/闲/和 从 9/7/8 移到 1/2/3
- 庄对/闲对 改为 4/5(可叠加,按两下=庄闲对)
- 6=幸运6(庄赢+标记)、7=龙7(庄赢)、8=熊8(闲赢)
- opening() 传 luck_six 实际值(原来硬编码0)
2026-05-01 22:02:30 +08:00
testadmin 3a13580754 chore: 版本号 v10.0.1 → v10.0.2 强制浏览器刷新 JS 缓存 2026-04-22 15:33:53 +08:00
testadmin 1c35fcfa76 fix: 移除 max_task_request(当前 Swoole 版本不支持) 2026-04-22 15:31:17 +08:00
testadmin 80282468cd fix: 百家乐/龙虎模板 JS 版本号改为动态,解决浏览器缓存不刷新
- tab_b.html: handle_b.js?3 → handle_b.js{Think.VERSION_V}
- tab_dt.html: handle_b.js?1 → handle_b.js{Think.VERSION_V}
- 硬编码版本号导致浏览器缓存旧JS,小键盘+号键移除不生效
2026-04-22 14:57:11 +08:00
testadmin f923300f63 fix: 移除小键盘+号键(numpad plus)换靴功能,防牌手误操作
- 8个荷官端 handle_*.js 移除 keyCode==107 换靴触发
- 鼠标撞边换靴保留不变
- 客户反馈+号键与龙/庄键太近易误触,且无恢复功能
2026-04-22 12:28:17 +08:00
testadmin 3508a9c6d7 fix: Swoole 加 max_request 防内存泄漏导致状态异常
- worker/task 每处理 10000 请求自动重生,释放内存
- 解决长时间运行后龙虎等游戏偶发状态异常的问题
2026-04-20 12:30:44 +08:00
testadmin dd3776e759 fix: resetNumberTab 支持 bet_status=3 + 路单变量名修正
- ResetNumberTabService: 条件增加 bet_status==3,修复 || 应为 && 的逻辑错误
- WaybillRemindService: last_banker_lenth → last_player_lenth(result==2 是闲家)
- 所有荷官操作端 handle_*.js: resetNumberTab 同步支持 betStatus==3
2026-04-20 10:51:49 +08:00
li 46dd7f6a1f fix: 百家乐开牌崩溃 - WaybillRemindService闲赢分支变量名错误
result==2(闲赢) show_y<6时设置了$last_banker_lenth
但后续使用$last_player_lenth → Undefined variable → Swoole异常
2026-03-29 18:13:25 +08:00
黎小北 728ce45856 修复扫牌器获取的 boot_id是旧数据的问题,导致下注等异常 2026-03-25 07:03:00 +08:00