hjhan
72b2a4cbf6
fix: 债券三字段调试日志改为 otcdebug gated,出问题时一键可定位
用户指出:上一笔直接删了 onBondPriceKeydown 的逐键 console.log 又没补 gated 版,
等于平时没噪音了、真出问题也看不见——这正是反复改几十遍都满足不了需求时才需要日志兜底的场景。
修复:
- onBondPriceKeydown 逐键 before/after(driver/rev) trace 改为 otcDebug.log(?otcdebug=1 才输出)
- onBondPriceEdit(失焦/粘贴) 补同款 gated trace
- calcBondForItem 补 enter/success/calc-error/post-fail 四条 gated trace
→ 三字段整条链路(逐键→回车→计算器→源/AUTO或失败)开开关即得完整现场
- main.js 第226/669行 catch 内 error console.log 保留(错误日志本就应在生产可见,利于定位)
- otcDebug 机制本身已存在且唯一:?otcdebug=1 或 localStorage.otcdebug=1 开启,
_MainLayout 注入 jsVersion/git/built,加载时打带版本 banner,平时零噪音
测试:
- diag.test.js 新增源码守卫:swapTradeEdit.js 三字段埋点必须 otcDebug.log、不得退回裸 console.log
- diag 18 例 / bondCalc 81 例全过
2026-07-30 10:15:00 +08:00
..
2024-05-09 14:06:26 +08:00
2026-07-30 10:15:00 +08:00
2026-07-30 10:06:21 +08:00
2024-05-09 14:06:26 +08:00
2026-07-30 10:06:21 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-29 16:32:15 +08:00
2026-07-28 14:50:05 +08:00