PageSourceSearch

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

js cief.org.cn collected 2026-10-02 09:55:23 UTC 9,118 bytes, 1 lines download raw bytes

1import{_ as Z}from"./DrupClhV.js";import{_ as Y}from"./BxPQt6NI.js";import{a as G}from"./BF7zkuD1.js";import"./DPhtfMym.js";/* empty css        *//* empty css        */import{d as U,u as W,M as X,c as N,r as u,P as J,R as K,N as O,g as Q,w as C,a as r,z as I,b as n,y as ee,V as te,f as l,F as S,G as M,o as c,H as d,e as ae,X as A}from"./D3L1gIDB.js";import{_ as se}from"./DlAUqK2U.js";const oe={class:"news-page"},ne={class:"bg-zinc-100"},ie={class:""},le={class:"bg-white"},re={class:"flex max-w-6xl mx-auto items-center justify-between mb-8 border-b border-gray-200"},ce={key:0,class:"text-center py-12"},ue={key:1,class:"text-center py-12"},de={key:2,class:"news-timeline max-w-6xl mx-auto px-4"},ge=["onClick"],me={class:"flex-shrink-0 w-20 mr-8 h-full date-bg rounded-2xl"},pe={class:"text-center"},he={class:"text-4xl mt-6 font-bold text-secondary-600 leading-none"},ve={class:"text-base text-secondary-600 mt-2 mb-6"},ye={class:"flex-1 min-w-0 mr-6"},fe={class:"text-lg font-medium text-gray-900 mb-3 group-hover:text-secondary-600 transition-colors leading-tight"},xe={class:"flex items-center text-xs text-gray-500 space-x-4 mt-2 mb-2"},_e=["innerHTML"],be={key:3,class:"mt-12 pb-12 flex justify-end max-w-6xl mx-auto"},we={class:"flex items-center space-x-1"},ke=["disabled"],Ce=["onClick"],Se={key:1,class:"px-2 text-gray-400"},Ae=["disabled"],Pe=U({__name:"index",setup(De){const{t:m,locale:q}=W(),_=X(),P=(t,e)=>{if(!t)return"";const s=q.value.toLowerCase().startsWith("en")?"En":"Zh",o=e+s,i=e+"Zh",g=t[o];if(g!=null&&g!=="")return String(g);const x=t[i];return x!=null&&x!==""?String(x):""},T=N(()=>[{id:"news",label:m("breadcrumb.news")},{id:"notice",label:m("navigation.announcements")}]),h=u("notice");J({title:m("navigation.announcements")+" - "+m("header.site_name"),meta:[{name:"description",content:m("news.subtitle")},{name:"keywords",content:"公告通知,教育新闻,国际教育,孔子学院,文化交流,教育合作"}]});const p=K(),D=O(),$=parseInt(p.query.page)||1,b=u(!1),v=u(""),w=u(""),z=u("latest"),y=u([]),a=u({page:$,pageSize:10,total:0,totalPages:0}),F=u([{id:"1",name:"基金会动态",slug:"foundation",createdAt:"",updatedAt:""},{id:"2",name:"孔子学院",slug:"confucius",createdAt:"",updatedAt:""},{id:"3",name:"教育合作",slug:"cooperation",createdAt:"",updatedAt:""},{id:"4",name:"文化交流",slug:"culture",createdAt:"",updatedAt:""},{id:"5",name:"学术研究",slug:"research",createdAt:"",updatedAt:""}]);N(()=>({keyword:v.value,category:w.value,page:a.value.page,pageSize:a.value.pageSize,sortBy:z.value}));const L=(t,e)=>t<1?1:t>e&&e>0?e:t,f=async()=>{b.value=!0;try{const t={keyword:v.value,category:w.value,page:a.value.page,pageSize:a.value.pageSize,sortBy:z.value};try{const e=await G.getNoticeList({titleZh:v.value,pageNum:a.value.page,pageSize:a.value.pageSize,status:"0"});if(console.log(e,"---"),(e==null?void 0:e.rows.length)>0){y.value=e.rows||[],a.value.total=e.total||0,a.value.totalPages=Math.ceil(a.value.total/a.value.pageSize);const s=L(a.value.page,a.value.totalPages);s!==a.value.page&&(a.value.page=s,D.replace({query:{...p.query,page:s.toString()}}))}}catch(e){console.warn("API调用失败,使用模拟数据:",e),y.value=V(),a.value.total=45,a.value.totalPages=Math.ceil(a.value.total/a.value.pageSize)}}catch(t){console.error("Failed to fetch notice:",t)}finally{b.value=!1}},V=()=>{const t=F.value[0];return[{id:"1",title:'中国国际中文教育基金会"成果展示学会"项目',summary:'为进一步推进中文文化交流,数字"一带一路"倡议与中文教育基金会合作开展中文教育基金会,开展学术交流活动的重要举措。通过学术交流与中文教育基金会合作,让更多学者了解中文。',publishDate:"2022-08-18",viewCount:1250,newsId:1},{id:"2",title:"开展以中文为主要媒介的创新性学科建设的数学科研项目",summary:'为进一步推进中文文化交流,数字"一带一路"倡议与中文教育基金会合作开展中文教育基金会,开展学术交流活动的重要举措。通过学术交流与中文教育基金会合作,让更多学者了解中文。',publishDate:"2022-08-15",viewCount:980,newsId:2},{id:"3",title:"明明科门多萨政府工作者代表团访问中国国际中文教育基金会",summary:'为进一步推进中文文化交流,数字"一带一路"倡议与中文教育基金会合作开展中文教育基金会,开展学术交流活动的重要举措。
1通过学术交流与中文教育基金会合作,让更多学者了解中文。',publishDate:"2022-08-13",viewCount:756,newsId:3},{id:"4",title:"中国国际中文教育基金会副理事长王芳芳访问阿根廷罗萨里奥",summary:'为进一步推进中文文化交流,数字"一带一路"倡议与中文教育基金会合作开展中文教育基金会,开展学术交流活动的重要举措。通过学术交流与中文教育基金会合作,让更多学者了解中文。',publishDate:"2022-08-10",viewCount:1120,newsId:4},{id:"5",title:'中国国际中文教育基金会"成果展示学会"项目',summary:'为进一步推进中文文化交流,数字"一带一路"倡议与中文教育基金会合作开展中文教育基金会,开展学术交流活动的重要举措。通过学术交流与中文教育基金会合作,让更多学者了解中文。',publishDate:"2022-08-08",viewCount:890,newsId:5}].map(s=>({...s,content:"",coverImage:`/images/news/news-${Math.floor(Math.random()*4)+1}.jpg`,author:"News Center",category:t,tags:["孔子学院","国际教育"],isPublished:!0,isFeatured:!1,slug:`news-${s.id}`,createdAt:s.publishDate,updatedAt:s.publishDate}))},k=t=>{a.value.page=t,D.push({query:{...p.query,page:t.toString()}}),f(),window.scrollTo({top:0,behavior:"smooth"})},B=t=>{const e=a.value.page;A({path:_(`/notice/${t.announcementId}`),query:{from:"notice",page:e.toString()}})},H=t=>{const e=new Date(t);return String(e.getDate()).padStart(2,"0")},R=t=>{const e=new Date(t),s=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0");return`${s}-${o}`},j=t=>new Date(t).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/\//g,"-"),E=()=>{const t=a.value.page,e=a.value.totalPages,s=[];if(e<=7)for(let o=1;o<=e;o++)s.push(o);else if(t<=4){for(let o=1;o<=5;o++)s.push(o);s.push("..."),s.push(e)}else if(t>=e-3){s.push(1),s.push("...");for(let o=e-4;o<=e;o++)s.push(o)}else{s.push(1),s.push("...");for(let o=t-1;o<=t+1;o++)s.push(o);s.push("..."),s.push(e)}return s};return Q(()=>{f()}),C(()=>p.query,t=>{t.category&&(w.value=t.category),t.q&&(v.value=t.q),f()},{immediate:!0}),C(()=>p.query.page,t=>{if(t){const e=parseInt(t);e!==a.value.page&&e>0&&(a.value.page=e,f())}},{immediate:!1}),C(h,t=>{t==="news"?A(_("/news")):t==="notice"&&A(_("/notice"))}),(t,e)=>{const s=Z,o=Y;return c(),r("div",oe,[I(s,{"title-image":"/images/news/title.png",alt:"通知公告","background-image":"/images/news/banner.png"}),n("section",ne,[n("div",ie,[n("div",le,[n("div",re,[I(o,{items:l(T),modelValue:l(h),"onUpdate:modelValue":e[0]||(e[0]=i=>te(h)?h.value=i:null),class:"flex space-x-8 py-4"},null,8,["items","modelValue"])])]),l(b)?(c(),r("div",ce,e[3]||(e[3]=[n("div",{class:"loading-spinner mx-auto mb-4"},null,-1),n("p",{class:"text-gray-500"},"加载中...",-1)]))):l(y).length===0?(c(),r("div",ue,e[4]||(e[4]=[n("svg",{class:"w-16 h-16 text-gray-300 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.34 0-4.47-.881-6.08-2.33"})],-1),n("p",{class:"text-gray-500 text-lg"},"暂无新闻",-1)]))):(c(),r("div",de,[(c(!0),r(S,null,M(l(y),i=>(c(),r("div",{key:i.announcementId,class:"news-item rounded-xl bg-white flex items-start mb-8 p-8 border-2 border-gray-100 cursor-pointer group hover:border-secondary-600",onClick:g=>B(i)},[n("div",me,[n("div",pe,[n("div",he,d(H(i.publishTime)),1),n("div",ve,d(R(i.publishTime)),1)])]),n("div",ye,[n("h3",fe,d(P(i,"title")),1),n("div",xe,[n("span",null,d(t.$t("common.creating_time"))+":"+d(j(i.publishTime)),1)]),n("p",{class:"text-gray-600 text-sm leading-relaxed mb-4",innerHTML:P(i,"description")},null,8,_e)])],8,ge))),128))])),l(a).totalPages>1?(c(),r("div",be,[n("div",we,[n("button",{onClick:e[1]||(e[1]=i=>k(l(a).page-1)),disabled:l(a).page<=1,class:"px-3 py-2 text-sm text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed"}," 上一页 ",8,ke),(c(!0),r(S,null,M(E(),i=>(c(),r(S,{key:i},[i!=="..."?(c(),r("button",{key:0,onClick:g=>k(Number(i)),class:ae(["w-8 h-8 text-sm rounded flex items-center justify-center",i===l(a).page?"bg-orange-500 text-white":"text-gray-600 hover:bg-gray-100"])},d(i),11,Ce)):(c(),r("span",Se,d(i),1))],64))),128)),n("button",{onClick:e[2]||(e[2]=i=>k(l(a).page+1)),disabled:l(a).page>=l(a).totalPages,class:"px-3 py-2 text-sm text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed"}," 下一页 ",8,Ae)])])):ee("",!0)])])])}}}),Le=se(Pe,[["__scopeId","data-v-e44534f6"]]);export{Le as default};

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.