检测你的网站在AI中的可见度

深度分析技术健康度、内容质量、权威背书,让大模型优先引用你的内容

100+技术指标检测
AI内容质量评分
4维度竞品对比

专业检测维度

技术健康度

检测Schema、LLM文件、语义化标签等10+技术指标

内容质量

评估数据具体度、案例完整性、结构化程度等4大维度

权威背书

分析第三方引用、认证资质、媒体报道等权威信号

引用潜力

预测被ChatGPT等大模型引用的可能性和排名

`; // 开始解析 const parser = new HtmlParser(demoHtml, url); const heading = parser.checkHeadingStructure(); const schema = parser.checkSchema(); const llmsTxt = parser.checkLlmsTxt(); const imageAlt = parser.checkImageAlt(); const ssl = parser.checkSSL(); const metaTags = parser.checkMetaTags(); const openGraph = parser.checkOpenGraph(); const specTable = { score: 3, maxScore: 10, issues: ['缺少产品规格参数表格'], fixes: ['将产品参数整理为HTML表格,方便AI提取结构化数据'], priority: 'medium', estimatedTime: '2-3小时', details: {} }; const internalLinks = { score: 7, maxScore: 10, issues: ['内部链接结构可以优化'], fixes: ['增加更多相关内容的内部链接'], priority: 'low', estimatedTime: '1小时', details: { internalLinks: 8 } }; const technicalScore = calculateTechnicalScore({ headingResult: heading, schemaResult: schema, llmsTxtResult: llmsTxt, imageAltResult: imageAlt, specTableResult: specTable, sslResult: ssl, metaTagsResult: metaTags, openGraphResult: openGraph, internalLinksResult: internalLinks }); // 生成模拟的内容质量分数 const dataSpecificity = 40 + Math.floor(Math.random() * 20); const caseCompleteness = 30 + Math.floor(Math.random() * 25); const authority = 25 + Math.floor(Math.random() * 20); const structureScore = Math.min(100, technicalScore * 0.8); const contentScore = Math.round(dataSpecificity * 0.35 + caseCompleteness * 0.25 + authority * 0.25 + structureScore * 0.15); const authorityScore = authority; const citationScore = Math.round((technicalScore * 0.4 + contentScore * 0.6) * 0.9 + Math.random() * 10); const totalScore = Math.round(technicalScore * 0.4 + contentScore * 0.35 + authorityScore * 0.25); const allIssues = [...schema.issues, ...llmsTxt.issues, ...specTable.issues, ...metaTags.issues, ...heading.issues]; const report = { id: 'report_demo_' + Date.now(), url: url + ' (演示模式)', createdAt: new Date().toISOString(), totalScore, industryAverage: 68, isDemo: true, dashboard: { radarChart: { contentQuality: contentScore, technicalReadability: technicalScore, authority: authorityScore, citationPotential: citationScore }, coreProblems: allIssues.slice(0, 3) }, contentQuality: { score: contentScore, scores: { dataSpecificity, caseCompleteness, authority, structure: structureScore }, suggestions: [ '增加具体的数字、百分比和数据支撑,每个观点用数据说话', '补充1-2个包含具体公司名称、项目时间、效果数据的完整客户案例', '增加第三方权威来源如媒体报道、白皮书、行业报告的引用链接', '将产品规格、参数、定价等整理为HTML表格,方便AI理解', '创建FAQ页面,用清晰的问答格式覆盖用户常见问题' ] }, technicalHealth: { score: technicalScore, checks: [ { name: 'SSL/TLS安全评级', ...ssl, category: '安全' }, { name: 'H1-H6语义树结构', ...heading, category: '语义' }, { name: 'Schema结构化数据', ...schema, category: '语义' }, { name: 'Meta标题描述', ...metaTags, category: '元数据' }, { name: 'Open Graph标签', ...openGraph, category: '元数据' }, { name: '图片ALT事实化描述', ...imageAlt, category: '媒体' }, { name: '语义化内部链接', ...internalLinks, category: '结构' }, { name: '产品规格参数表格', ...specTable, category: '内容' }, { name: 'llms.txt配置', ...llmsTxt, category: 'AI优化' } ], urgentFixes: allIssues.slice(0, 5) } }; showResult(report); } function showResult(report) { document.getElementById('loadingPage').classList.add('hidden'); document.getElementById('resultPage').classList.remove('hidden'); // 基本信息 document.getElementById('resultUrl').textContent = report.url; document.getElementById('resultDate').textContent = '检测时间:' + new Date(report.createdAt).toLocaleString('zh-CN'); // 如果是演示模式,添加提示 if (report.isDemo) { const demoNotice = document.createElement('div'); demoNotice.className = 'bg-yellow-50 border border-yellow-200 rounded-lg p-4 mb-4'; demoNotice.innerHTML = `
演示模式 - 由于无法访问目标网站,此报告基于模拟数据生成。 实际检测结果可能有所不同。建议尝试其他可公开访问的URL。
`; const resultUrlEl = document.getElementById('resultUrl'); resultUrlEl.parentNode.insertBefore(demoNotice, resultUrlEl.nextSibling); } // 总分动画 const totalScoreEl = document.getElementById('totalScore'); let currentScore = 0; const targetScore = report.totalScore; const scoreInterval = setInterval(() => { if (currentScore < targetScore) { currentScore++; totalScoreEl.textContent = currentScore; } else { clearInterval(scoreInterval); } }, 20); // 进度环 setTimeout(() => { const offset = 440 - (440 * targetScore / 100); document.getElementById('scoreCircle').style.strokeDashoffset = offset; }, 100); // 各维度分数 setTimeout(() => { document.getElementById('techScore').textContent = report.dashboard.radarChart.technicalReadability; document.getElementById('contentScore').textContent = report.dashboard.radarChart.contentQuality; document.getElementById('authorityScore').textContent = report.dashboard.radarChart.authority; document.getElementById('citationScore').textContent = report.dashboard.radarChart.citationPotential; document.getElementById('techBar').style.width = report.dashboard.radarChart.technicalReadability + '%'; document.getElementById('contentBar').style.width = report.dashboard.radarChart.contentQuality + '%'; document.getElementById('authorityBar').style.width = report.dashboard.radarChart.authority + '%'; document.getElementById('citationBar').style.width = report.dashboard.radarChart.citationPotential + '%'; }, 500); // 核心问题 const coreProblemsEl = document.getElementById('coreProblems'); if (!report.dashboard.coreProblems || report.dashboard.coreProblems.length === 0) { coreProblemsEl.innerHTML = '
太棒了!没有发现严重问题
'; } else { coreProblemsEl.innerHTML = report.dashboard.coreProblems.map((problem, i) => `
${i + 1}
${problem}
`).join(''); } // 技术检测项 const techChecksEl = document.getElementById('techChecks'); techChecksEl.innerHTML = report.technicalHealth.checks.map(check => { const percentage = check.maxScore > 0 ? Math.round(check.score / check.maxScore * 100) : 0; const statusColor = percentage >= 80 ? 'text-green-600' : percentage >= 50 ? 'text-yellow-600' : 'text-red-600'; const bgColor = percentage >= 80 ? 'bg-green-50' : percentage >= 50 ? 'bg-yellow-50' : 'bg-red-50'; const icon = percentage >= 80 ? 'fa-check-circle text-green-500' : percentage >= 50 ? 'fa-exclamation-circle text-yellow-500' : 'fa-times-circle text-red-500'; const priorityColors = { critical: 'bg-red-100 text-red-700', high: 'bg-orange-100 text-orange-700', medium: 'bg-yellow-100 text-yellow-700', low: 'bg-gray-100 text-gray-600' }; const priorityLabels = { critical: '紧急', high: '高', medium: '中', low: '低' }; return `
${check.name} ${check.issues && check.issues.length > 0 ? `${priorityLabels[check.priority]}` : ''}
${check.score}/${check.maxScore}
${check.issues && check.issues.length > 0 ? ` ` : ''}
`; }).join(''); // 内容质量雷达图 setTimeout(() => { const ctx1 = document.getElementById('contentRadarChart').getContext('2d'); new Chart(ctx1, { type: 'radar', data: { labels: ['数据具体度', '案例完整性', '权威背书', '结构化程度'], datasets: [{ label: '你的网站', data: [ report.contentQuality.scores.dataSpecificity, report.contentQuality.scores.caseCompleteness, report.contentQuality.scores.authority, report.contentQuality.scores.structure ], backgroundColor: 'rgba(22, 93, 255, 0.2)', borderColor: 'rgba(22, 93, 255, 1)', borderWidth: 2 }] }, options: { scales: { r: { beginAtZero: true, max: 100, ticks: { stepSize: 20, font: { size: 10 } } } }, plugins: { legend: { position: 'bottom', labels: { font: { size: 11 } } } } } }); }, 800); // 内容质量详情 const contentDetailsEl = document.getElementById('contentDetails'); const contentItems = [ { name: '数据具体度', score: report.contentQuality.scores.dataSpecificity, desc: '衡量内容中包含具体数字、百分比、可验证数据的程度' }, { name: '案例完整性', score: report.contentQuality.scores.caseCompleteness, desc: '衡量客户案例、用户证言、项目效果等可信度指标' }, { name: '权威背书', score: report.contentQuality.scores.authority, desc: '衡量第三方引用、媒体报道、认证资质等权威信号' }, { name: '结构化程度', score: report.contentQuality.scores.structure, desc: '衡量标题层级、列表、表格、FAQ等结构化元素' } ]; contentDetailsEl.innerHTML = contentItems.map(item => `
${item.name} ${item.score}

${item.desc}

`).join(''); // 竞品对比雷达图 setTimeout(() => { const ctx2 = document.getElementById('competitorRadarChart').getContext('2d'); new Chart(ctx2, { type: 'radar', data: { labels: ['技术健康度', '内容质量', '权威背书', '引用潜力'], datasets: [ { label: '你的网站', data: [ report.dashboard.radarChart.technicalReadability, report.dashboard.radarChart.contentQuality, report.dashboard.radarChart.authority, report.dashboard.radarChart.citationPotential ], backgroundColor: 'rgba(22, 93, 255, 0.2)', borderColor: 'rgba(22, 93, 255, 1)', borderWidth: 2 }, { label: '行业标杆', data: [92, 88, 95, 90], backgroundColor: 'rgba(0, 180, 42, 0.1)', borderColor: 'rgba(0, 180, 42, 1)', borderWidth: 2 }, { label: '竞品A', data: [65, 58, 45, 60], backgroundColor: 'rgba(255, 125, 0, 0.1)', borderColor: 'rgba(255, 125, 0, 1)', borderWidth: 1 } ] }, options: { scales: { r: { beginAtZero: true, max: 100, ticks: { stepSize: 20, font: { size: 10 } } } }, plugins: { legend: { position: 'bottom', labels: { font: { size: 11 } } } } } }); }, 800); // 竞品对比表格 const competitorTableEl = document.getElementById('competitorTable'); competitorTableEl.innerHTML = ` 你的网站 ← ${report.totalScore} ${report.dashboard.radarChart.technicalReadability} ${report.dashboard.radarChart.contentQuality} ${report.dashboard.radarChart.authority} 行业标杆 90 92 88 95 竞品A 58 65 58 45 行业平均 68 70 65 55 `; // 行动计划 const actionPlanEl = document.getElementById('actionPlan'); const allChecks = report.technicalHealth.checks.filter(c => c.issues && c.issues.length > 0); const highPriority = allChecks.filter(c => c.priority === 'high' || c.priority === 'critical'); const mediumPriority = allChecks.filter(c => c.priority === 'medium'); let actionItems = []; highPriority.forEach(check => { check.fixes.forEach(fix => { actionItems.push({ priority: check.priority, task: fix, time: check.estimatedTime, category: check.category }); }); }); mediumPriority.forEach(check => { check.fixes.forEach(fix => { actionItems.push({ priority: check.priority, task: fix, time: check.estimatedTime, category: check.category }); }); }); // 补充内容优化建议 report.contentQuality.suggestions.forEach(s => { actionItems.push({ priority: 'medium', task: s, time: '4-8小时', category: '内容' }); }); const priorityColors = { critical: 'bg-red-100 text-red-700', high: 'bg-orange-100 text-orange-700', medium: 'bg-yellow-100 text-yellow-700', low: 'bg-gray-100 text-gray-600' }; const priorityLabels = { critical: '紧急', high: '高', medium: '中', low: '低' }; actionPlanEl.innerHTML = actionItems.slice(0, 8).map((item, i) => `
${i + 1}
${priorityLabels[item.priority]} ${item.category}

${item.task}

预计:${item.time}

`).join(''); } function goHome() { document.getElementById('resultPage').classList.add('hidden'); document.getElementById('loadingPage').classList.add('hidden'); document.getElementById('homePage').classList.remove('hidden'); setButtonLoading(false); document.getElementById('urlInput').value = ''; } function downloadReport() { alert('报告下载功能即将上线,敬请期待!'); } // 回车键提交 document.getElementById('urlInput').addEventListener('keypress', function(e) { if (e.key === 'Enter' && !document.getElementById('analyzeBtn').disabled) { startAnalysis(); } });