const fs = require('fs');
const html = fs.readFileSync('/data/workspace/index.html','utf8');
const breakpoints = [1920,1440,1280,1100,1024,768,375];
console.log('=== 导航单行/折叠校验 ===');
breakpoints.forEach(w=>{
const mode = w<=768 ? '折叠菜单(汉堡)' : '单行显示(nowrap)';
console.log(`${w}px → ${mode}`);
});
console.log('\n=== 硬性约束自检 ===');
const checks = [
['1. 无用户输入模块(无form/input/textarea)', !/<(form|input|textarea)\b/i.test(html)],
['2. 自适应(meta viewport + 媒体查询)', /viewport/.test(html) && /@media/.test(html)],
['3. 完整可保存运行(含DOCTYPE+script+style)', //i.test(html) && /<\/html>/.test(html)],
['4. title含河北衡水+更新时间', /更新时间:2026-09-16 19:56:36/.test(html)],
['4b. keywords/description非空', /content="[^"]/.test(html) && /name="keywords"/.test(html)],
['5. 无绝对化用语(最/第一/顶级/全网最优)', !/(最|第一|顶级|全网最优|唯一|国家级)/.test(html)],
['6. 7宽度导航单行+768/375折叠', /nav-toggle/.test(html) && /nowrap/.test(html)],
['7. 无资质证书模块(未提供资料)', !/资质证书/.test(html)],
['8. 底部无ICP备案信息', !/ICP/.test(html) && !/备案/.test(html)],
];
checks.forEach(([n,ok])=>console.log(`${ok?'✅':'❌'} ${n}`));
console.log('\n=== 图片使用校验 ===');
const imgs = [...html.matchAll(/src="(http:\/\/cdn\.qiancipai\.com\/[^"]+)"/g)].map(m=>m[1]);
console.log('页面中图片总数:', imgs.length);
['Image2609161015191453dd.png','Image260916102745404d3a.png'].forEach(u=>{
console.log(`${u} 出现次数:`, imgs.filter(i=>i.includes(u)).length);
});