60 lines
2.4 KiB
JavaScript
60 lines
2.4 KiB
JavaScript
|
|
// 调试公司图片数据
|
||
|
|
const companyImagesData = require('./网页未导入数据/文旅产业/文旅_内推岗位企业图片.json');
|
||
|
|
const companyJobsNewData = require('./src/data/companyJobsNew.json');
|
||
|
|
|
||
|
|
console.log('='.repeat(60));
|
||
|
|
console.log('公司图片数据调试报告');
|
||
|
|
console.log('='.repeat(60));
|
||
|
|
|
||
|
|
// 1. 检查图片数据文件
|
||
|
|
console.log('\n1. 文旅_内推岗位企业图片.json 总数:', companyImagesData.length);
|
||
|
|
console.log('\n前5个岗位的图片数据:');
|
||
|
|
companyImagesData.slice(0, 5).forEach(item => {
|
||
|
|
const imageCount = item['BOSS照片链接'] ? item['BOSS照片链接'].split(',').length : 0;
|
||
|
|
console.log(` - ${item['内推岗位名称']}: ${imageCount}张图片`);
|
||
|
|
});
|
||
|
|
|
||
|
|
// 2. 检查岗位数据文件
|
||
|
|
console.log('\n2. companyJobsNew.json 总数:', companyJobsNewData.length);
|
||
|
|
|
||
|
|
// 3. 匹配检查
|
||
|
|
console.log('\n3. 岗位匹配情况:');
|
||
|
|
const imageJobNames = new Set(companyImagesData.map(item => item['内推岗位名称']));
|
||
|
|
const jobNames = companyJobsNewData.map(job => job['内推岗位名称']);
|
||
|
|
|
||
|
|
console.log(' 有图片数据的岗位:', imageJobNames.size);
|
||
|
|
console.log(' 岗位数据总数:', jobNames.length);
|
||
|
|
|
||
|
|
const matchedJobs = jobNames.filter(name => imageJobNames.has(name));
|
||
|
|
console.log(' 匹配成功的岗位数:', matchedJobs.length);
|
||
|
|
|
||
|
|
console.log('\n4. 匹配成功的前10个岗位:');
|
||
|
|
matchedJobs.slice(0, 10).forEach(name => {
|
||
|
|
const imageData = companyImagesData.find(item => item['内推岗位名称'] === name);
|
||
|
|
const imageCount = imageData['BOSS照片链接'].split(',').length;
|
||
|
|
console.log(` ✓ ${name}: ${imageCount}张图片`);
|
||
|
|
});
|
||
|
|
|
||
|
|
// 5. SEO专员的详细数据
|
||
|
|
console.log('\n5. SEO专员岗位的详细数据:');
|
||
|
|
const seoJob = companyJobsNewData.find(job => job['内推岗位名称'] === 'SEO专员');
|
||
|
|
const seoImages = companyImagesData.find(item => item['内推岗位名称'] === 'SEO专员');
|
||
|
|
|
||
|
|
if (seoJob) {
|
||
|
|
console.log(' ✓ SEO专员岗位存在于companyJobsNew.json');
|
||
|
|
console.log(' 公司介绍:', seoJob['公司介绍'] ? '存在' : '不存在');
|
||
|
|
} else {
|
||
|
|
console.log(' ✗ SEO专员岗位不存在于companyJobsNew.json');
|
||
|
|
}
|
||
|
|
|
||
|
|
if (seoImages) {
|
||
|
|
console.log(' ✓ SEO专员图片数据存在');
|
||
|
|
const urls = seoImages['BOSS照片链接'].split(',');
|
||
|
|
console.log(' 图片数量:', urls.length);
|
||
|
|
console.log(' 第一张图片URL:', urls[0]);
|
||
|
|
} else {
|
||
|
|
console.log(' ✗ SEO专员图片数据不存在');
|
||
|
|
}
|
||
|
|
|
||
|
|
console.log('\n' + '='.repeat(60));
|