主要更新内容: - 优化UI组件(视频播放器、HR访问模态框、岗位信息展示等) - 更新数据文件(简历、岗位、项目案例等) - 添加新的图片资源(面试状态图标等) - 新增AgentPage等页面组件 - 清理旧的备份文件,提升代码库整洁度 - 优化岗位等级和面试状态的数据结构 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
// 读取mockData.js
|
|
const mockDataPath = path.join(__dirname, 'src/data/mockData.js');
|
|
const content = fs.readFileSync(mockDataPath, 'utf-8');
|
|
|
|
// 提取垂直能力课部分
|
|
const verticalMatch = content.match(/name:\s*"垂直能力课"[\s\S]*?units:\s*\[([\s\S]*?)\]\s*,\s*\/\/ 保留原始list/);
|
|
|
|
if (verticalMatch) {
|
|
const unitsContent = verticalMatch[1];
|
|
|
|
// 提取所有unit名称
|
|
const unitNames = [...unitsContent.matchAll(/name:\s*"([^"]+)",\s*courses:/g)].map(m => m[1]);
|
|
|
|
console.log('垂直能力课的units数量:', unitNames.length);
|
|
console.log('\nunits列表:');
|
|
unitNames.forEach((name, index) => {
|
|
console.log(` ${index + 1}. ${name}`);
|
|
});
|
|
|
|
// 统计每个unit的课程数
|
|
console.log('\n每个unit的课程数:');
|
|
const unitBlocks = unitsContent.split(/\},\s*\{/).filter(Boolean);
|
|
|
|
unitNames.forEach((name, index) => {
|
|
const unitPattern = new RegExp(`name:\\s*"${name.replace(/[()]/g, '\\$&')}"[\\s\\S]*?courses:\\s*\\[([\\s\\S]*?)\\]`, 'g');
|
|
const match = unitPattern.exec(unitsContent);
|
|
if (match) {
|
|
const coursesContent = match[1];
|
|
const courseCount = (coursesContent.match(/\{[^}]*id:\s*\d+/g) || []).length;
|
|
console.log(` ${name}: ${courseCount}个课程`);
|
|
}
|
|
});
|
|
} else {
|
|
console.log('未找到垂直能力课的units结构');
|
|
}
|