fix: 代码审查修复 — 空值保护、Firefox渐变、移动端导航、CSS变量化、NPM私服配置
- index.html: section.items空值检查(5处)、移除dead badgeStyle - 物流网报告×3 + AI转型方案×3: 添加background-clip:text兼容Firefox - ai-dev-workflow/v2: 移动端汉堡导航+抽屉覆盖层+返回顶部 - crmeb-deploy-plan: Markdown→HTML+新增NPM私服(Verdaccio)章节 - 需求对比分析报告: 谷歌蓝→品牌蓝, CSS变量化 - ai-dev-workflow-v2: npm私服统一指向npm.ycbat.com(上游阿里云镜像) - CLAUDE.md/design-tokens.md: 修正UI规范与目录文档
This commit is contained in:
+9
-10
@@ -355,7 +355,10 @@ const wikiData = [
|
||||
{ path: "graphify-rs使用手册/报告/graphify-rs-usage-guide.html", title: "graphify-rs 使用手册", desc: "代码知识图谱工具完整使用指南,含安装、构建、查询、集成", date: "2026-05-08" },
|
||||
{ path: "Graphify 深度分析报告/代码/graphify-analysis.html", title: "Graphify 代码分析", desc: "Graphify 项目的代码结构、质量指标与重构建议", date: "2026-04-29" },
|
||||
{ path: "代码图谱工具调研/报告/code-structure-tools-analysis.html", title: "代码图谱工具调研", desc: "主流代码结构与可视化工具的横向对比分析", date: "2026-04-29" },
|
||||
{ path: "mcp-services-guide/index.html", title: "MCP 服务大全", desc: "适合开发者使用的 MCP 服务大全,含功能对比与快速开始指南", date: "2026-04-29" }
|
||||
{ path: "mcp-services-guide/index.html", title: "MCP 服务大全", desc: "适合开发者使用的 MCP 服务大全,含功能对比与快速开始指南", date: "2026-04-29" },
|
||||
{ path: "研发型企业AI转型方案/报告/ai-transformation-plan.html", title: "研发型企业 AI 转型方案", desc: "三大篇章:AI工具全景图(7大类30+工具)+ 分级培训方案(入门→中级→进阶)+ AI增强售前交付方法论,含投入产出分析", date: "2026-05-30" },
|
||||
{ path: "研发型企业AI转型方案/报告/ai-dev-workflow.html", title: "AI 驱动开发流程:多模型协同工作流", desc: "Claude Code主力Agent + DeepSeek/Qwen分级调度 + open-code-review质量门禁 + 企业知识库RAG + 个人记忆系统,含12周落地路线图与ROI量化分析", date: "2026-05-30" },
|
||||
{ path: "研发型企业AI转型方案/报告/ai-dev-workflow-v2.html", title: "AI 开发流程 V2.0:新项目脚手架驱动 + 老项目维护双轨制", desc: "两套完整工作流:新项目以脚手架为基础全量生成(70-90%AI占比),老项目以代码考古驱动增量修改(小步提交≤200行diff),含实操案例与完整Prompt", date: "2026-05-31" }
|
||||
]},
|
||||
{ dir: "政务与行业", icon: "🏛", desc: "政府招投标、智慧监管、政策解读", color: "pink",
|
||||
items: [
|
||||
@@ -380,18 +383,11 @@ const wikiData = [
|
||||
];
|
||||
|
||||
const allItems = [];
|
||||
for (const s of wikiData) { for (const item of s.items) { allItems.push(Object.assign({}, item, { section: s.dir, icon: s.icon })); } }
|
||||
for (const s of wikiData) { if (s.items) { for (const item of s.items) { allItems.push(Object.assign({}, item, { section: s.dir, icon: s.icon })); } } }
|
||||
|
||||
let currentView = 'all';
|
||||
let searchQuery = '';
|
||||
|
||||
const badgeStyle = {
|
||||
pink: 'background:#FFF0F6;color:#EB2F96;border:1px solid #FFADD2',
|
||||
blue: 'background:#E6F4FF;color:#1677FF;border:1px solid #91CAFF',
|
||||
mint: 'background:#F6FFED;color:#52C41A;border:1px solid #B7EB8F',
|
||||
lavender: 'background:#F9F0FF;color:#722ED1;border:1px solid #D3ADF7'
|
||||
};
|
||||
|
||||
var drawerEl = document.getElementById('drawerOverlay');
|
||||
document.getElementById('menuBtn').addEventListener('click', function() { drawerEl.classList.add('show'); });
|
||||
document.getElementById('drawerClose').addEventListener('click', function() { drawerEl.classList.remove('show'); });
|
||||
@@ -402,6 +398,7 @@ function buildNav(targetEl) {
|
||||
html += '<a class="nav-item' + (currentView === 'all' ? ' active' : '') + '" href="#" data-view="all"><span class="nav-icon">🏠</span><span>全部文档</span><span class="nav-count">' + allItems.length + '</span></a>';
|
||||
html += '</div>';
|
||||
for (const section of wikiData) {
|
||||
if (!section.items) continue;
|
||||
html += '<div class="nav-section"><div class="nav-section-title">' + section.desc + '</div>';
|
||||
html += '<a class="nav-item' + (currentView === section.dir ? ' active' : '') + '" href="#" data-view="' + section.dir + '"><span class="nav-icon">' + section.icon + '</span><span>' + section.dir + '</span><span class="nav-count">' + section.items.length + '</span></a>';
|
||||
html += '<div class="sub-nav' + (currentView === section.dir ? ' open' : '') + '">';
|
||||
@@ -420,6 +417,7 @@ function buildChips() {
|
||||
var bar = document.getElementById('chipBar');
|
||||
var html = '<span class="chip' + (currentView === 'all' ? ' active' : '') + '" data-view="all">全部<span class="chip-count">' + allItems.length + '</span></span>';
|
||||
for (const section of wikiData) {
|
||||
if (!section.items) continue;
|
||||
html += '<span class="chip' + (currentView === section.dir ? ' active' : '') + '" data-view="' + section.dir + '">' + section.icon + ' ' + section.dir + '<span class="chip-count">' + section.items.length + '</span></span>';
|
||||
}
|
||||
bar.innerHTML = html;
|
||||
@@ -447,6 +445,7 @@ function renderAllView(main) {
|
||||
html += '<div class="stat-item"><span class="stat-num">' + filtered.length + '</span><span class="stat-label">' + (searchQuery ? '搜索结果' : '当前展示') + '</span></div>';
|
||||
html += '</div>';
|
||||
for (const section of wikiData) {
|
||||
if (!section.items) continue;
|
||||
const items = searchQuery ? filtered.filter(function(i){ return i.section === section.dir; }) : section.items;
|
||||
if (!items.length) continue;
|
||||
html += '<div class="wiki-section"><div class="wiki-section-title">' + section.icon + ' ' + section.dir + '</div>';
|
||||
@@ -466,7 +465,7 @@ function renderAllView(main) {
|
||||
|
||||
function renderSectionView(main) {
|
||||
var section = wikiData.find(function(s){ return s.dir === currentView; });
|
||||
if (!section) return;
|
||||
if (!section || !section.items) return;
|
||||
var filtered = searchQuery ? section.items.filter(function(i) { return i.title.toLowerCase().indexOf(searchQuery) !== -1 || i.desc.toLowerCase().indexOf(searchQuery) !== -1; }) : section.items;
|
||||
var html = '<div class="breadcrumb"><a href="#" data-breadcrumb="all">Wiki 知识库</a><span class="sep">/</span><span>' + section.icon + ' ' + section.dir + '</span></div>';
|
||||
html += '<div class="wiki-section"><div class="wiki-section-title">' + section.icon + ' ' + section.dir + '</div>';
|
||||
|
||||
Reference in New Issue
Block a user