# -*- coding: utf-8 -*-
"""
全站虚假数据与广告法风险彻底排查清理脚本
"""
import os
import re
import sys
sys.stdout.reconfigure(encoding='utf-8')
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def clean_index_pc():
p = os.path.join(ROOT, 'addons/official/view/web/official_home/index.html')
with open(p, 'r', encoding='utf-8') as f:
c = f.read()
# 1. 幻灯片 1 的 metrics
old_s1 = '''
'''
new_s1 = ''' '''
# 2. 幻灯片 2 的 metrics
old_s2 = '''
全端互通
iOS / Android / 微信小程序
'''
new_s2 = '''
全端互通
iOS / Android / 微信小程序
'''
# 3. 幻灯片 3 的 metrics
old_s3 = ''' '''
new_s3 = ''' '''
# 4. 幻灯片 4 的 metrics
old_s4 = ''' '''
new_s4 = '''
四大成熟系统
商城 / 收银 / 进销存 / SaaS
'''
c = c.replace(old_s1, new_s1)
c = c.replace(old_s2, new_s2)
c = c.replace(old_s3, new_s3)
c = c.replace(old_s4, new_s4)
# 替换文章板块的违规词汇
c = c.replace('千万级真实交易峰值考验', '真实业务场景严格检验')
c = c.replace('千万级真实交易峰值验证', '高并发业务场景严格检验')
c = c.replace('千万级商品与高并发秒杀场景', '高并发与多商品秒杀业务场景')
c = c.replace('白盒源码交付', '完整源码交付')
c = c.replace('纳海川技术委员会', '纳海川研发团队')
c = c.replace('立足西南数谷', '立足贵阳')
with open(p, 'w', encoding='utf-8') as f:
f.write(c)
print("✓ index.html 已完成合规更新")
def clean_index_mobile():
p = os.path.join(ROOT, 'addons/official/view/web/official_home/index_e.html')
with open(p, 'r', encoding='utf-8') as f:
c = f.read()
# 移动端 Slide 1 metrics
old_m1 = ''' '''
new_m1 = ''' '''
# 移动端 Slide 2 metrics
old_m2 = ''' '''
new_m2 = ''' '''
# 移动端 Slide 3 metrics & title
c = c.replace('格物致知启新智
人机协同创非凡', '政企私域智能体
人机协同辅助决策')
old_m3 = ''' '''
new_m3 = ''' '''
# 移动端 Slide 4 metrics & title
c = c.replace('积厚流光成重器
矩阵赋能拓坦途', '成熟产品矩阵体系
支撑企业商业全链路')
c = c.replace('千万级真实交易峰值淬炼的标准成熟产品矩阵', '经真实商业场景严格验证的标准成熟产品矩阵')
old_m4 = ''' '''
new_m4 = ''' '''
c = c.replace(old_m1, new_m1)
c = c.replace(old_m2, new_m2)
c = c.replace(old_m3, new_m3)
c = c.replace(old_m4, new_m4)
with open(p, 'w', encoding='utf-8') as f:
f.write(c)
print("✓ index_e.html 已完成合规更新")
def clean_other_pages():
# 1. official_online_message/list.html
p1 = os.path.join(ROOT, 'addons/official/view/web/official_online_message/list.html')
with open(p1, 'r', encoding='utf-8') as f:
c1 = f.read()
c1 = c1.replace('技术委员会公用邮箱', '技术支持与咨询邮箱')
c1 = c1.replace('白盒源码交付协议', '完整工程源码交付协议')
c1 = c1.replace('白盒源码', '完整工程源码')
with open(p1, 'w', encoding='utf-8') as f:
f.write(c1)
print("✓ official_online_message/list.html 已完成合规更新")
# 2. official_online_message/list_e.html
p2 = os.path.join(ROOT, 'addons/official/view/web/official_online_message/list_e.html')
with open(p2, 'r', encoding='utf-8') as f:
c2 = f.read()
c2 = c2.replace('立足西南数谷', '立足贵阳')
c2 = c2.replace('白盒审查', '技术架构评估')
with open(p2, 'w', encoding='utf-8') as f:
f.write(c2)
print("✓ official_online_message/list_e.html 已完成合规更新")
# 3. official_product/service_page.html
p3 = os.path.join(ROOT, 'addons/official/view/web/official_product/service_page.html')
with open(p3, 'r', encoding='utf-8') as f:
c3 = f.read()
c3 = c3.replace('全量交付白盒源码与技术文档', '全量交付工程源码与技术文档')
with open(p3, 'w', encoding='utf-8') as f:
f.write(c3)
print("✓ official_product/service_page.html 已完成合规更新")
if __name__ == '__main__':
clean_index_pc()
clean_index_mobile()
clean_other_pages()
print("全站虚假数据与广告法风险清理完毕!")