PageSourceSearch

https://cief.org.cn/_nuxt/CkHihPPK.js

js cief.org.cn collected 2026-09-24 21:39:27 UTC 2,372 bytes, 1 lines download raw bytes

1import{cmsApi as v}from"./C8R0BvqS.js";import{u as P,M as w,r as l,c as f}from"./cl7XfM0u.js";function Z(){const{locale:d}=P(),c=w(),n=l([]),i=l([]),s=l(!1),u=l(null),y=e=>d.value==="en"?e.categoryNameEn:e.categoryNameZh,N=e=>{const a=[],r=o=>{for(const t of o)a.push(t),t.children&&t.children.length>0&&r(t.children)};return r(e),a},C=(e,a)=>c(`${a}/${e.categoryCode}`),g=(e,a)=>(console.log(`🔗 构建${a}头部子菜单:`,e.map(r=>({code:r.categoryCode,name:r.categoryNameZh,order:r.orderNum,parentId:r.parentId}))),e.map(r=>({id:r.categoryCode,label:y(r),path:C(r,a),order:r.orderNum,isActive:!0})).sort((r,o)=>r.order-o.order)),p=async()=>{try{s.value=!0;const e=await v.category.getList();if(e.code===200&&e.data){const a=e.data;console.log("🔍 原始树形数据:",a);const r=a.find(o=>o.categoryCode==="Brand");r&&r.children?(n.value=r.children,console.log("🔍 品牌运营子栏目:",n.value.map(o=>({code:o.categoryCode,name:o.categoryNameZh,order:o.orderNum,parentId:o.parentId})))):(console.warn('⚠️ 未找到"品牌运营"节点'),n.value=[])}}catch(e){console.error("加载品牌栏目失败:",e),u.value="加载品牌菜单失败"}finally{s.value=!1}},h=async()=>{try{s.value=!0;const e=await v.category.getList();if(e.code===200&&e.data){const a=e.data,o=N(a).filter(t=>{const m=t.orderNum;return m>=6&&m<=10&&t.parentId===0});console.log("🔍 合作生态栏目 (orderNum 6-10):",o.map(t=>({code:t.categoryCode,name:t.categoryNameZh,order:t.orderNum,parentId:t.parentId}))),i.value=o}}catch(e){console.error("加载合作生态栏目失败:",e),u.value="加载合作生态菜单失败"}finally{s.value=!1}},b=f(()=>{const e=g(n.value,"/brand");return console.log("🎯 品牌运营导航菜单(头部导航):",e),{id:"brand",label:d.value==="en"?"Brand Operation":"品牌运营",path:c("/brand"),order:3,isActive:!0,children:e&&e.length>0?e:void 0}}),I=f(()=>{const e=g(i.value,"/partnership");return console.log("🎯 合作生态导航菜单(头部导航):",e),{id:"partnership",label:d.value==="en"?"Partnership":"合作生态",path:c("/partnership"),order:4,isActive:!0,children:e&&e.length>0?e:void 0}});return{brandCategories:n,partnershipCategories:i,loading:s,error:u,getBrandNavigation:b,getPartnershipNavigation:I,loadBrandCategories:p,loadPartnershipCategories:h,init:async()=>{await Promise.all([p(),h()])}}}export{Z as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.