feat(timer): 循环训练组进度改为圆环分段弧 + 信息气泡三行合一
- progress-ring 新增 sets/currentSet/resting/successColor 属性, 圆环外圈绘制分段弧(已完成=主色/当前=呼吸光点/休息下一组=绿),单组模式零渲染 - timer 删除顶部 circuit-bar 进度面板,布局骨架三模式统一 - 呼吸环淡化(描边 0.55→0.20,柔光渐变强度减半) - 目标卡与提示气泡合并为 info-bubble,状态文案(撑住/休息中/已暂停)并入气泡顶部
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
// 一次性脚本:清除小程序/云函数中的调试 console.* 输出
|
||||
// 安全策略:
|
||||
// 1) 箭头函数体 `const x = (e) => console.xxx(...)` → 替换为 `const x = () => {}`
|
||||
// 2) 独立 console 语句整行删除(含无分号情况)
|
||||
// 3) 收敛多余空行(>=3 个连续换行压成 2 个)
|
||||
// 删除后由调用方逐个 node --check 验证语法。
|
||||
const fs = require('fs')
|
||||
|
||||
const files = [
|
||||
'/Users/liubleed/Documents/wx_pbzc/utils/cloud.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/utils/storage.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/utils/voice.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/utils/theme.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/app.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/pages/leaderboard/leaderboard.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/pages/timer/timer.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/pages/settings/settings.js',
|
||||
'/Users/liubleed/Documents/wx_pbzc/cloudfunctions/leaderboard/index.js',
|
||||
]
|
||||
|
||||
const INDEP = /^\s*console\.(log|warn|error|debug)\(.*\)\s*;?\s*$/
|
||||
const ARROW = /^(\s*const\s+\w+\s*=\s*\([^)]*\)\s*=>\s*)console\.(log|warn|error|debug)\(/
|
||||
|
||||
let total = 0
|
||||
for (const f of files) {
|
||||
if (!fs.existsSync(f)) { console.log('SKIP (missing):', f); continue }
|
||||
const lines = fs.readFileSync(f, 'utf8').split('\n')
|
||||
const out = []
|
||||
let removed = 0
|
||||
for (const line of lines) {
|
||||
const a = line.match(ARROW)
|
||||
if (a) {
|
||||
out.push(a[1].replace(/=>\s*$/, '=> {}'))
|
||||
removed++
|
||||
continue
|
||||
}
|
||||
if (INDEP.test(line)) { removed++; continue }
|
||||
out.push(line)
|
||||
}
|
||||
const cleaned = out.join('\n').replace(/\n{3,}/g, '\n\n')
|
||||
fs.writeFileSync(f, cleaned)
|
||||
total += removed
|
||||
console.log(`cleaned ${removed} ${f.replace('/Users/liubleed/Documents/wx_pbzc/', '')}`)
|
||||
}
|
||||
console.log('TOTAL removed:', total)
|
||||
Reference in New Issue
Block a user