"""coach-detail.html 多项改动""" filepath = "docs/h5_ui/pages/coach-detail.html" with open(filepath, "r", encoding="utf-8") as f: c = f.read() # 1. "当前档位:星级" → "绩效档位进度",去掉"星级""皇冠"字样 c = c.replace( '当前档位:星级', '绩效档位进度' ) c = c.replace( '星级 80h', '当前 80h' ) c = c.replace( '皇冠 100h', '目标 100h' ) # 2. 工龄客户信息放大 c = c.replace( '''
工龄 3年
客户 68人
''', '''
工龄 3年
客户 68人
''' ) # 3. 全页文字放大2-3号:把关键的 text-sm → text-base, text-xs → text-sm, text-[10px] → text-xs # 只在 body 内容区域做(不动 banner 和 style) # 用更精确的替换 # 绩效概览 4-grid 数值放大 c = c.replace('text-xl font-bold text-primary pv">87.5', 'text-2xl font-bold text-primary pv">87.5') c = c.replace('text-xl font-bold text-success pv">¥6,950', 'text-2xl font-bold text-success pv">¥6,950') c = c.replace('text-xl font-bold text-warning pv">¥86,200', 'text-2xl font-bold text-warning pv">¥86,200') c = c.replace('text-xl font-bold text-purple-600 pv">38', 'text-2xl font-bold text-purple-600 pv">38') # section 标题放大 c = c.replace('text-sm font-semibold text-gray-13 mb-4">绩效概览', 'text-base font-semibold text-gray-13 mb-4">绩效概览') c = c.replace('text-sm font-semibold text-gray-13 mb-4">收入明细', 'text-base font-semibold text-gray-13 mb-4">收入明细') c = c.replace('text-sm font-semibold text-gray-13 mb-4">任务执行', 'text-base font-semibold text-gray-13 mb-4">任务执行') c = c.replace('text-sm font-semibold text-gray-13 mb-4">客户关系 TOP5', 'text-base font-semibold text-gray-13 mb-4">客户关系 TOP5') c = c.replace('text-sm font-semibold text-gray-13 mb-4">近期服务明细', 'text-base font-semibold text-gray-13 mb-4">近期服务明细') c = c.replace('text-sm font-semibold text-gray-13 mb-4">更多信息', 'text-base font-semibold text-gray-13 mb-4">更多信息') # 收入明细项目名放大 c = c.replace('text-sm text-gray-9">基础课时费', 'text-base text-gray-9">基础课时费') c = c.replace('text-sm text-gray-9">激励课时费', 'text-base text-gray-9">激励课时费') c = c.replace('text-sm text-gray-9">充值提成', 'text-base text-gray-9">充值提成') c = c.replace('text-sm text-gray-9">酒水提成', 'text-base text-gray-9">酒水提成') c = c.replace('text-sm font-semibold text-gray-9">合计', 'text-base font-semibold text-gray-9">合计') # 收入金额放大 c = c.replace('text-sm font-bold text-gray-13 pv">¥3,500', 'text-base font-bold text-gray-13 pv">¥3,500') c = c.replace('text-sm font-bold text-gray-13 pv">¥1,800', 'text-base font-bold text-gray-13 pv">¥1,800') c = c.replace('text-sm font-bold text-gray-13 pv">¥1,200', 'text-base font-bold text-gray-13 pv">¥1,200') c = c.replace('text-sm font-bold text-gray-13 pv">¥450', 'text-base font-bold text-gray-13 pv">¥450') # 更多信息行放大 c = c.replace('text-sm text-gray-7">入职日期', 'text-base text-gray-7">入职日期') c = c.replace('text-sm text-gray-13">2023-03-15', 'text-base text-gray-13">2023-03-15') c = c.replace('text-sm text-gray-7">上月工资', 'text-base text-gray-7">上月工资') c = c.replace('text-sm font-medium text-gray-13 pv">¥7,200', 'text-base font-medium text-gray-13 pv">¥7,200') c = c.replace('text-sm text-gray-7">上月业绩时长', 'text-base text-gray-7">上月业绩时长') c = c.replace('text-sm text-gray-13 pv">92.0h', 'text-base text-gray-13 pv">92.0h') c = c.replace('text-sm text-gray-7">累计服务客户', 'text-base text-gray-7">累计服务客户') c = c.replace('text-sm text-gray-13 pv">68人', 'text-base text-gray-13 pv">68人') c = c.replace('text-sm text-gray-7">累计服务时长', 'text-base text-gray-7">累计服务时长') c = c.replace('text-sm text-gray-13 pv">2,860h', 'text-base text-gray-13 pv">2,860h') # 4. 任务执行:替换进度条为任务简报 old_task = '''

任务执行

本月完成 38 个任务 待处理 12 个
回访任务 15/18
充值任务 8/10
激活任务 10/15
关怀任务 5/7
''' # 检查是否已经被放大过(text-base) if old_task not in c: # 可能还是 text-sm 版本 old_task = old_task.replace('text-base font-semibold', 'text-sm font-semibold') new_task = '''

任务执行

3

置顶任务

9

普通待办

2

已放弃

已完成 38

回访王先生 2月7日
已完成
充值跟进李女士 2月6日
已完成
激活陈女士 2月5日
已完成
关怀张先生 2月4日
已完成
''' if old_task in c: c = c.replace(old_task, new_task) print(" ✅ 任务执行替换成功") else: print(" ❌ 任务执行未找到匹配,尝试原始版本") # 5. 更多信息:去掉擅长项目,服务客户/业绩时长/工资做成表格 old_more = '''

更多信息

入职日期 2023-03-15
擅长项目 中🎱、斯诺克、花式
上月工资 ¥7,200
上月业绩时长 92.0h
累计服务客户 68人
累计服务时长 2,860h
''' new_more = '''

更多信息

入职日期 2023-03-15
月份 服务客户 业绩时长 工资
本月预估 22人 87.5h ¥6,950
上月 25人 92.0h ¥7,200
4月 20人 85.0h ¥6,600
3月 18人 78.5h ¥6,100
2月 15人 65.0h ¥5,200
''' if old_more in c: c = c.replace(old_more, new_more) print(" ✅ 更多信息替换成功") else: print(" ❌ 更多信息未找到匹配") with open(filepath, "w", encoding="utf-8") as f: f.write(c) print("coach-detail.html 更新完成")