Files
ALL-teach_sys/frontend_大健康/repair_industries.py
KQL cd2e307402 初始化12个产业教务系统项目
主要内容:
- 包含12个产业的完整教务系统前端代码
- 智能启动脚本 (start-industry.sh)
- 可视化产业导航页面 (index.html)
- 项目文档 (README.md)

优化内容:
- 删除所有node_modules和.yoyo文件夹,从7.5GB减少到2.7GB
- 添加.gitignore文件避免上传不必要的文件
- 自动依赖管理和智能启动系统

产业列表:
1. 文旅产业 (5150)
2. 智能制造 (5151)
3. 智能开发 (5152)
4. 财经商贸 (5153)
5. 视觉设计 (5154)
6. 交通物流 (5155)
7. 大健康 (5156)
8. 土木水利 (5157)
9. 食品产业 (5158)
10. 化工产业 (5159)
11. 能源产业 (5160)
12. 环保产业 (5161)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 14:14:14 +08:00

69 lines
2.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
print("开始修复industries数组的括号问题...")
# 读取文件
with open('/Users/apple/Documents/cursor/教务系统/frontend_大健康/src/mocks/resumeInterviewMock.js', 'r', encoding='utf-8') as f:
lines = f.readlines()
# 找到industries数组
start_line = -1
for i, line in enumerate(lines):
if 'const industries = [' in line:
start_line = i
break
if start_line == -1:
print("未找到industries数组")
exit(1)
# 重新构建industries数组确保括号正确
new_lines = lines[:start_line+1] # 保留到 const industries = [
bracket_depth = 1 # 已经有一个 [
brace_depth = 0
for i in range(start_line + 1, len(lines)):
line = lines[i]
# 检测是否到达数组结束
if '];' in line and bracket_depth == 1 and brace_depth == 0:
# 这应该是industries数组的结束
new_lines.append('];\n')
# 添加剩余的内容
new_lines.extend(lines[i+1:])
break
# 统计这一行的括号
open_brackets = line.count('[')
close_brackets = line.count(']')
open_braces = line.count('{')
close_braces = line.count('}')
bracket_depth += open_brackets - close_brackets
brace_depth += open_braces - close_braces
# 添加这一行
new_lines.append(line)
# 如果括号深度有问题,尝试修复
if i == 866: # 第867行索引866之前应该平衡
if brace_depth > 0:
# 需要添加闭合括号
while brace_depth > 0:
new_lines.append(' }\n')
brace_depth -= 1
if bracket_depth > 1:
while bracket_depth > 1:
new_lines.append(']\n')
bracket_depth -= 1
# 写回文件
with open('/Users/apple/Documents/cursor/教务系统/frontend_大健康/src/mocks/resumeInterviewMock.js', 'w', encoding='utf-8') as f:
f.writelines(new_lines)
print("✓ 修复完成")