PageSourceSearch

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

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

1var y=Object.defineProperty;var R=(e,n,r)=>n in e?y(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var C=(e,n,r)=>R(e,typeof n!="symbol"?n+"":n,r);import{cmsApi as v}from"./C8R0BvqS.js";import{r as m,ai as E}from"./cl7XfM0u.js";class u extends Error{constructor(r,s,a){super(r);C(this,"type");C(this,"statusCode");this.name="CategoryContentError",this.type=s,this.statusCode=a}}function N(e){var n,r,s;if(!navigator.onLine||(n=e.message)!=null&&n.includes("Network")||(r=e.message)!=null&&r.includes("fetch"))return new u("网络连接失败,请检查网络设置","NETWORK_ERROR");if(e.response){const a=e.response.status||e.statusCode;if(a===404)return new u("内容未找到,该栏目可能不存在","NOT_FOUND",404);if(a>=500)return new u("服务器错误,请稍后再试","SERVER_ERROR",a)}return(s=e.message)!=null&&s.includes("timeout")||e.code==="ECONNABORTED"?new u("请求超时,请重试","TIMEOUT"):new u(e.message||"加载内容失败,请重试","UNKNOWN")}function D(){const e=m(null),n=m(!1),r=m(null),s=new Map,a=300*1e3;let i=null,l=null;const d=t=>Date.now()-t.timestamp<a,p=async(t,f=!1)=>{if(!(l===t&&n.value)){if(i&&i.abort(),!f&&s.has(t)){const o=s.get(t);if(d(o)){e.value=o.data,r.value=null;return}else s.delete(t)}i=new AbortController,l=t,n.value=!0,r.value=null;try{const o=await v.category.getCategoryContent(t);if(l!==t)return;if(o.code===200&&o.data)e.value=o.data,s.set(t,{data:o.data,timestamp:Date.now()});else throw new Error(o.msg||"获取内容失败")}catch(o){if(o.name==="AbortError"||l!==t)return;const c=N(o);r.value=c,e.value=null,console.error("[CategoryContent] 加载失败:",{categoryId:t,errorType:c.type,errorMessage:c.message,statusCode:c.statusCode,originalError:o})}finally{l===t&&(n.value=!1,i=null,l=null)}}},w=()=>{s.clear()},g=()=>{const t=Date.now();for(const[f,o]of s.entries())t-o.timestamp>=a&&s.delete(f)},h=t=>p(t,!0);return{content:E(e),loading:E(n),error:E(r),loadCategoryContent:p,clearCache:w,clearExpiredCache:g,retry:h}}export{D 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.