+
/`;
+
+ // 移动端使用智能截断
+ breadcrumbsHtml += `
`;
+
+ if (pathSegments.length > 2) {
+ // 第一个路径段
+ const firstSegment = pathSegments[0];
+ const firstPath = encodeURIComponent(pathSegments.slice(0, 1).join('/'));
+
+ breadcrumbsHtml += `
+
+ ${firstSegment}
+
+
+
...
+ `;
+
+ // 最后一个路径段
+ if (pathSegments.length > 1) {
+ const lastSegment = pathSegments[pathSegments.length - 1];
+ const lastPath = pathSegments.map(encodeURIComponent).join('/');
+
+ breadcrumbsHtml += `
+
+ ${lastSegment}
+
+ `;
+ }
+ } else {
+ // 如果段落不多,则全部显示
+ breadcrumbsHtml += pathSegments.map((segment, index) => {
+ const segmentPath = pathSegments.slice(0, index + 1).map(encodeURIComponent).join('/');
+ return `
+
+ ${index > 0 ? '/' : ''}
+
+ ${segment}
+
+
+ `;
+ }).join('');
+ }
+
+ breadcrumbsHtml += `
`;
+
+ // 桌面端显示全部路径段
+ breadcrumbsHtml += `
`;
+
+ breadcrumbsHtml += pathSegments.map((segment, index) => {
+ const segmentPath = pathSegments.slice(0, index + 1).map(encodeURIComponent).join('/');
+ return `
+
+ ${index > 0 ? '/' : ''}
+
+ ${segment}
+
+
+ `;
+ }).join('');
+
+ breadcrumbsHtml += `
`;
+ }
+
+ // 筛选视图中的搜索参数展示
+ if (pageType === 'filter' && searchParams.toString()) {
+ breadcrumbsHtml += `
+