更新12个教务系统并优化项目大小
主要更新: - 更新所有12个产业的教务系统数据和功能 - 删除所有 node_modules 文件夹(节省3.7GB) - 删除所有 .yoyo 缓存文件夹(节省1.2GB) - 删除所有 dist 构建文件(节省55MB) 项目优化: - 项目大小从 8.1GB 减少到 3.2GB(节省60%空间) - 保留完整的源代码和配置文件 - .gitignore 已配置,防止再次提交大文件 启动脚本: - start-industry.sh/bat/ps1 脚本会自动检测并安装依赖 - 首次启动时自动运行 npm install - 支持单个或批量启动产业系统 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
35
frontend_智能开发/addCompanyImages.cjs
Normal file
35
frontend_智能开发/addCompanyImages.cjs
Normal file
@@ -0,0 +1,35 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// 读取图片数据
|
||||
const imagesDataPath = path.join(__dirname, '网页未导入数据/智能开发产业/智能开发_内推岗位企业图片.json');
|
||||
const imagesData = JSON.parse(fs.readFileSync(imagesDataPath, 'utf-8'));
|
||||
|
||||
// 读取岗位数据
|
||||
const jobsDataPath = path.join(__dirname, 'src/mocks/companyJobsData.json');
|
||||
const jobsData = JSON.parse(fs.readFileSync(jobsDataPath, 'utf-8'));
|
||||
|
||||
// 创建图片映射
|
||||
const imageMap = {};
|
||||
imagesData.forEach(item => {
|
||||
const position = item['内推岗位名称'];
|
||||
const imageLinks = item['BOSS照片链接'];
|
||||
if (imageLinks) {
|
||||
// 将逗号分隔的链接转为数组
|
||||
imageMap[position] = imageLinks.split(',').map(url => url.trim());
|
||||
}
|
||||
});
|
||||
|
||||
// 为岗位数据添加图片
|
||||
jobsData.forEach(job => {
|
||||
const position = job['内推岗位名称'];
|
||||
if (imageMap[position]) {
|
||||
job['公司图片'] = imageMap[position];
|
||||
}
|
||||
});
|
||||
|
||||
// 写回文件
|
||||
fs.writeFileSync(jobsDataPath, JSON.stringify(jobsData, null, 2), 'utf-8');
|
||||
|
||||
console.log('成功添加公司图片数据!');
|
||||
console.log(`共处理 ${jobsData.length} 个岗位,其中 ${Object.keys(imageMap).length} 个岗位有图片数据`);
|
||||
Reference in New Issue
Block a user