import{L as a,l as e,q as t,o as s,a as l,f as i,g as n,t as d,m as o,e as c,h as r,aO as u,aP as v,a2 as m,a3 as p,aA as g}from"./vendor-edc0678f.js";import{a as f}from"./content-3391292a.js";import{_ as y}from"./index-4c745ab9.js";const _={class:"news-detail-page"},h={key:0,class:"detail-content"},w={class:"detail-title"},k={class:"detail-meta"},L={class:"meta-date"},b={class:"meta-views"},j=(a=>(m("data-v-a0c1d42d"),a=a(),p(),a))(()=>n("i",{class:"van-icon van-icon-eye-o"},null,-1)),x={key:0,class:"detail-cover"},D=["src","alt"],I=["innerHTML"],T=y({__name:"news-detail",setup(m){const p=a(),y=e({}),T=e(!1),C=a=>{if(!a)return"";return new Date(a).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})};return t(()=>{(async()=>{const a=p.params.id;if(a){T.value=!0;try{const e=await f(a);e&&200===e.code&&(y.value=e.data||{})}catch(e){}finally{T.value=!1}}})()}),(a,e)=>{const t=u,m=g,p=v;return s(),l("div",_,[i(t,{title:a._t18("navbar_newsDetail"),"left-arrow":"",onClickLeft:e[0]||(e[0]=e=>a.$router.go(-1)),fixed:"",placeholder:""},null,8,["title"]),y.value.id?(s(),l("div",h,[n("h1",w,d(y.value.title),1),n("div",k,[n("span",L,d(C(y.value.publishTime)),1),n("span",b,[j,o(" "+d(y.value.viewNum||0),1)])]),y.value.coverImage?(s(),l("div",x,[n("img",{src:y.value.coverImage,alt:y.value.title},null,8,D)])):c("",!0),n("div",{class:"detail-body",innerHTML:y.value.content},null,8,I)])):c("",!0),T.value?(s(),r(m,{key:1,class:"loading"})):y.value.id?c("",!0):(s(),r(p,{key:2,description:a._t18("utils_noData")},null,8,["description"]))])}}},[["__scopeId","data-v-a0c1d42d"]]);export{T as default};
