Files
online_sys/frontend_财经商贸/final_fix.py
KQL a7242f0c69 Initial commit: 教务系统在线平台
- 包含4个产业方向的前端项目:智能开发、智能制造、大健康、财经商贸
- 已清理node_modules、.yoyo等大文件,项目大小从2.6GB优化至631MB
- 配置完善的.gitignore文件

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 18:16:55 +08:00

32 lines
879 B
Python

#!/usr/bin/env python3
import re
# 读取文件
with open('src/mocks/resumeInterviewMock.js', 'r', encoding='utf-8') as f:
content = f.read()
# 删除_end临时键
content = re.sub(r',\s*\/\/ 添加空对象以便语法正确\s*\n\s*"_end": \[\]', '', content)
# 修复第6512行的双花括号问题
lines = content.split('\n')
if len(lines) > 6511:
# 确保第6512行只有一个}
lines[6511] = ' }'
content = '\n'.join(lines)
# 写回文件
with open('src/mocks/resumeInterviewMock.js', 'w', encoding='utf-8') as f:
f.write(content)
print("修复完成")
# 验证语法
import subprocess
result = subprocess.run(['node', '-c', 'src/mocks/resumeInterviewMock.js'],
capture_output=True, text=True)
if result.returncode == 0:
print("✅ 语法验证通过!")
else:
print(f"❌ 仍有语法错误:{result.stderr}")