网页
综合
更新时间 2026-11-14 11:09:18
产业新闻_鞋面/鞋补丁行业资讯与工艺知识-晟恒鞋业
自动蜘蛛
www.shxieye.com
正文约 6000 字
登录 注册 手机版 用手机扫一扫 会员中心 产业新闻_鞋面/鞋补丁行业资讯与工艺知识-晟恒鞋业 ${moduleHotKeywords .map( (item) => ` ${ICONS.hot}${escapeText(item)} `, ) .join("")} `; return true; }; const loadHotKeywords = async () => { if (moduleHotKeywords.length || hotLoading) return; hotLoading = true; try { const res = await r("/shop/frontend/search/getSearchbar", {}, "get"); const searchItems = Array.isArray(res?.data?.search) ? res.data.search : []; const recommend = searchItems .map((item) => item?.recommend || "") .filter(Boolean) .join(","); moduleHotKeywords = recommend .split(/[,,]/) .map((item) => item.trim()) .filter(Boolean) .filter((item, index, arr) => arr.indexOf(item) === index) .slice(0, 12); } catch (e) { moduleHotKeywords = []; } finally { hotLoading = false; renderHotKeywords(); startPlaceholderRotate(); } }; // 统一请求封装 const r = (url = "", data = {}, type = "get") => { const isDev = false; const isLocal = isDev || ["127.0.0.1", "localhost"].includes(window.location.hostname); const baseURL = isLocal ? "http://127.0.0.1:20210" : ""; const cleanUrl = url.startsWith("/") ? url : "/" + url; const headers = { lang: localStorage.getItem("lang") || "zh-cn", "gw-shop-user-token": localStorage.getItem("GwShopUserToken"), }; if (isLocal) headers["tg-url"] = "https://242462.saaas.com"; return new Promise((resolve, reject) => { $.ajax({ url: baseURL + cleanUrl, type: type.toLowerCase(), data, headers, timeout: 15000, }) .done((res) => { if (res && res.code !== undefined && res.code !== 0) { console.warn(`[r] 业务错误 cleanUrl:`, res.msg || res.message); } resolve(res); }) .fail((xhr, textStatus, err) => { const errMsg = textStatus === "timeout" ? t("requestTimeout") : t("requestFailed"); console.error(`[r] 请求失败 cleanUrl:`, textStatus, err); reject({ code: -1, msg: errMsg, xhr, textStatus, err, }); }); }); }; // 图标 SVG const ICONS = { arrowDown: ``, arrowDownDark: ``, mbArrow: ``, search: ``, user: ``, phone: ``, email: ``, location: ``, close: ``, clock: ``, hot: ``, globe: ``, }; // 导航数据解析辅助函数(兼容多种字段名) const getNavField = (item, ...keys) => { for (const key of keys) { if (item[key] !== undefined) return item[key]; } return ""; }; const getNavName = (item) => getNavField(item, "title", "name", "label"); const getNavLink = (item) => { if (item.jump) { if (typeof item.jump === "string") return item.jump; if (item.jump.href) return item.jump.href; if (item.jump.url) return item.jump.url; } return getNavField(item, "link", "href", "url") || "javascript:void(0);"; }; const getNavChildren = (item) => item.children || item.subNav || item.subMenus || []; const normalizeNavPath = (link) => { if (!link || link === "#" || link === "javascript:void(0);") return ""; try { const url = new URL(link, window.location.origin); if (url.origin !== window.location.origin) return ""; return (url.pathname || "/").replace(/\/+$/, "") || "/"; } catch (e) { return String(link).split(/[?#]/)[0].replace(/\/+$/, "") || "/"; } }; const getNavRemark = (item) => item.remark || ""; const getNavIcon = (item) => { const icon = item.icon || item.iconImg; if (!icon) return ""; if (typeof icon === "string") { return ``; } if (icon.type === "image" && icon.value) { return ``; } return ""; }; // 初始化导航 const container = document.querySelector(".jrTopNav20260424"); if (!container) return; const browseModuleEl = container.closest(".gw-browse-module"); browseModuleEl?.classList.add("jr-top-nav-host"); document.body?.classList.add("jr-has-top-nav"); const namedModuleEl = container.closest('[name="顶部导航"]') || document.querySelector('[name="顶部导航"]'); const moduleEl = namedModuleEl || container; const canApplyFixed = Boolean(moduleEl); const qs = (sel) => container.querySelector(sel); const qsa = (sel) => container.querySelectorAll(sel); const getBrowseModule = () => browseModuleEl || container.closest(".gw-browse-module"); let stickyTopOffsetValue = ""; let stickyTopOffsetFrame = null; const getEditorWarningHeight = () => { const warning = document.querySelector(".editor-warning-saaas-host-only"); if (!warning) return 0; const style = window.getComputedStyle(warning); if (style.display === "none" || style.visibility === "hidden") return 0; const rect = warning.getBoundingClientRect(); return Math.max(0, Math.round(rect.height || warning.offsetHeight || 0)); }; const applyStickyTopOffset = () => { const offset = getEditorWarningHeight(); const value = `${offset}px`; if (value === stickyTopOffsetValue) return offset; stickyTopOffsetValue = value; container.style.setProperty("--jr-sticky-top-offset", value); moduleEl?.style?.setProperty("--jr-sticky-top-offset", value); getBrowseModule()?.style.setProperty("--jr-sticky-top-offset", value); return offset; }; const initStickyTopOffset = () => { const update = () => { if (stickyTopOffsetFrame) return; stickyTopOffsetFrame = requestAnimationFrame(() => { stickyTopOffsetFrame = null; const prevValue = stickyTopOffsetValue; applyStickyTopOffset(); if (prevValue !== stickyTopOffsetValue) { scheduleOverflowMenu(); } }); }; update(); window.addEventListener("resize", update, { passive: true }); window.addEventListener("orientationchange", update, { passive: true }); const warning = document.querySelector(".editor-warning-saaas-host-only"); if (warning && window.ResizeObserver) { const observer = new ResizeObserver(update); observer.observe(warning); } if (window.MutationObserver) { const observer = new MutationObserver(update); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ["class", "style"], }); } }; if (CONFIG.themeColor) { container.style.setProperty("--gw-theme-color", CONFIG.themeColor); container.style.setProperty("--theme", CONFIG.themeColor); } if (CONFIG.navBackgroundColor) { container.style.setProperty( "--nav-bg", normalizeBlurBackground(CONFIG.navBackgroundColor, effectiveNavBlur), ); } if (CONFIG.navTextColor) { container.style.setProperty("--nav-text", CONFIG.navTextColor); } container.style.setProperty("--nav-blur", `${effectiveNavBlur}px`); const normalNavBg = CON
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。