1import{d as T,R as j,M as z,r as p,w as A,g as L,c as S,P as V,a as m,y as H,f as a,b as t,z as P,A as Z,H as v,_ as F,o as g,W as R}from"./cl7XfM0u.js";import{n as M}from"./B6h6tqsZ.js";import"./Dcdj5DrC.js";/* empty css *//* empty css */import{u as _}from"./Cx6pI0a3.js";import{_ as O}from"./DlAUqK2U.js";const $={class:"news-detail-page mt-24"},E={key:0,class:"min-h-screen flex items-center justify-center"},W={key:1,class:"min-h-screen flex items-center justify-center"},q={class:"text-center"},G={key:2,class:"news-content"},J={class:"bg-white py-8 lg:py-12"},K={class:"cief-container"},Q={class:"max-w-4xl mx-auto"},U={class:"text-3xl md:text-4xl lg:text-5xl font-bold text-gray-900 mb-6 leading-tight"},X={class:"flex flex-wrap items-center gap-6 text-gray-500 mb-6"},Y={class:"flex items-center space-x-2"},ee={class:"flex items-center space-x-2"},te={class:"flex items-center space-x-2"},se={class:""},oe={class:""},ae={class:"grid grid-cols-1 lg:grid-cols-3 gap-8"},ne={class:"lg:col-span-3 bg-white"},re={class:"rounded-lg shadow-sm p-10 max-w-4xl mx-auto"},le={class:"prose prose-lg max-w-none"},ie=["innerHTML"],ce=T({__name:"[id]",setup(de){const f=j(),D=z(),s=p(null),y=p([]),h=p(!1),d=p(!1),r=_(s,"title"),w=_(s,"content"),x=_(s,"description"),k=async()=>{const o=f.params.id;if(!o){d.value=!0;return}try{h.value=!0,d.value=!1;const e=await M.getNewsDetail(o);console.log(e,"---"),s.value=e.data,await N()}catch(e){console.error("è·åæ°é»è¯¦æ
失败:",e),d.value=!0,s.value=null}finally{h.value=!1}};A(()=>f.params.id,(o,e)=>{o&&o!==e&&k()},{immediate:!0}),L(()=>{n.value||k()});const N=async()=>{try{const o=await M.getNewsList({pageNum:1,pageSize:3,status:"0"});o.rows&&o.rows.length>0&&(y.value=o.rows.map(e=>({id:e.newsId,newsId:e.newsId,title:e.titleZh,summary:e.contentZh?e.contentZh.substring(0,100)+"...":"",content:e.contentZh,coverImage:e.webCover,author:e.createBy,publishDate:e.publishTime,category:null,tags:[],viewCount:0,isPublished:!0,isFeatured:!1,slug:`news-${e.newsId}`,createdAt:e.createTime,updatedAt:e.updateTime})))}catch(o){console.error("è·åç¸å
³æ°é»å¤±è´¥:",o),y.value=[]}},n=S(()=>s.value?{id:s.value.newsId,title:r.value,content:w.value,summary:x.value||w.value,coverImage:s.value.webCover,author:s.value.createBy,publishDate:s.value.publishTime,newsId:s.value.newsId,category:null,tags:[],viewCount:s.value.viewCount||0,isPublished:!0,isFeatured:!0,slug:"",createdAt:s.value.createTime||new Date().toISOString(),updatedAt:s.value.updateTime||new Date().toISOString()}:null),B=o=>new Date(o).toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric"});return V(()=>{var o,e,u,l,i,c;return{title:r.value?`${r.value} - ä¸å½å½é
䏿æè²åºéä¼`:"æ°é»è¯¦æ
",meta:[{name:"description",content:x.value||((o=n.value)==null?void 0:o.summary)||"ä¸å½å½é
䏿æè²åºé伿°é»è¯¦æ
"},{name:"keywords",content:((u=(e=n.value)==null?void 0:e.tags)==null?void 0:u.join(","))||"æ°é»,æè²,å½é
åä½"},{property:"og:title",content:r.value||"æ°é»è¯¦æ
"},{property:"og:description",content:x.value||((l=n.value)==null?void 0:l.summary)||"ä¸å½å½é
䏿æè²åºé伿°é»è¯¦æ
"},{property:"og:image",content:((i=s.value)==null?void 0:i.webCover)||((c=n.value)==null?void 0:c.coverImage)||"/images/default-og.jpg"}]}}),(o,e)=>{var l,i,c,b,C,I;const u=F;return g(),m("div",$,[a(h)?(g(),m("div",E,e[0]||(e[0]=[t("div",{class:"text-center"},[t("div",{class:"loading-spinner mx-auto mb-4"}),t("p",{class:"text-gray-500"},"å è½½ä¸...")],-1)]))):a(d)?(g(),m("div",W,[t("div",q,[e[2]||(e[2]=t("svg",{class:"w-16 h-16 text-gray-300 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("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)),e[3]||(e[3]=t("h1",{class:"text-2xl font-bold text-gray-900 mb-2"},"æ°é»ä¸åå¨",-1)),e[4]||(e[4]=t("p",{class:"text-gray-500 mb-6"},"æ±æï¼æ¨è®¿é®çæ°é»é¡µé¢ä¸åå¨æå·²è¢«å é¤ã",-1)),P(u,{to:a(D)("/news"),class:"inline-flex items-center px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors"},{default:Z(()=>e[1]||(e[1]=[R(" è¿åæ°é»å表 ",-1)])),_:1,__:[1]},8,["to"])])])):a(n)?(g(),m("div",G,[t("header",J,[t("div",K,[t("div",Q,[t("h1",U,v(a(r)),1),t("div",X,[t("div",Y,[e[5]||
1(e[5]=t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1)),t("span",null,v(((l=a(s))==null?void 0:l.createBy)||((i=a(n))==null?void 0:i.author)),1)]),t("div",ee,[e[6]||(e[6]=t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),t("span",null,v(B(((c=a(s))==null?void 0:c.publishTime)||((b=a(n))==null?void 0:b.publishDate))),1)]),t("div",te,[e[7]||(e[7]=t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)),t("span",null,v(((C=a(s))==null?void 0:C.viewCount)||((I=a(n))==null?void 0:I.viewCount)||0)+" é
读",1)])])])])]),t("main",se,[t("div",oe,[t("div",ae,[t("article",ne,[t("div",re,[t("div",le,[t("div",{innerHTML:a(w)},null,8,ie)])])])])])])])):H("",!0)])}}}),xe=O(ce,[["__scopeId","data-v-e6d0d3a9"]]);export{xe 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.