Files
online_sys/frontend_智能开发/updateCompanyJobs.cjs
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

46 lines
1.6 KiB
JavaScript
Raw Permalink 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.

const fs = require('fs');
const path = require('path');
// 读取智能开发内推岗位数据
const smartDevJobs = JSON.parse(
fs.readFileSync('./网页未导入数据/智能开发产业/智能开发内推岗位.json', 'utf-8')
);
console.log(`找到 ${smartDevJobs.length} 个智能开发内推岗位`);
// 字段映射 - 确保兼容性
const transformedJobs = smartDevJobs.map(job => {
// 保持原有字段,确保兼容性
return {
"内推岗位名称": job["内推岗位名称"],
"就业管家课程": "智能开发", // 统一设置为智能开发
"薪资": job["薪资"],
"工作地点": job["工作地点"],
"学历要求": job["学历要求"],
"招聘人数": job["招聘人数"],
"职位标签": job["职位标签"] || [],
"职位描述": job["职位描述"],
"任职要求": job["任职要求"],
"公司介绍": job["公司介绍"],
"岗位标签": "就业", // 统一设置
"岗位相关标签": job["岗位相关标签"] || "专业相关岗位",
"福利标签": job["福利标签"] || [],
"截止时间": job["岗位招聘截止时间"] || "2025/12/31"
};
});
// 写入文件
fs.writeFileSync(
'./src/mocks/companyJobsData.json',
JSON.stringify(transformedJobs, null, 2),
'utf-8'
);
console.log('✅ 企业内推岗位数据更新成功!');
console.log(`- 共更新 ${transformedJobs.length} 个岗位`);
// 输出前3个岗位作为示例
console.log('\n岗位示例');
transformedJobs.slice(0, 3).forEach((job, index) => {
console.log(` ${index + 1}. ${job["内推岗位名称"]} - ${job["薪资"]} - ${job["工作地点"]}`);
});