PageSourceSearch

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

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

1import{d as L,R as N,N as S,M as V,r as g,w as A,P as H,a,b as t,y as i,O as h,f as o,z as w,A as y,H as l,e as I,F as P,G as q,X as v,_ as F,o as r,W as k}from"./cl7XfM0u.js";import{n as O}from"./B6h6tqsZ.js";import"./Dcdj5DrC.js";/* empty css        *//* empty css        */import{_ as R}from"./DlAUqK2U.js";const Z={class:"news-preview-page"},E={key:0,class:"min-h-screen flex items-center justify-center"},$={key:1,class:"min-h-screen flex items-center justify-center"},G={class:"text-center"},U={key:2,class:"news-content"},W={class:"bg-gray-50 py-4"},X={class:"cief-container"},J={class:"flex items-center space-x-2 text-sm text-gray-500"},K={key:0},Q={key:1,class:"text-gray-900"},Y={class:"bg-white py-8 lg:py-12"},tt={class:"cief-container"},et={class:"max-w-4xl mx-auto"},st={class:"mb-4"},ot={key:0,class:"mb-4"},nt={class:"px-3 py-1 bg-primary-100 text-primary-700 text-sm font-medium rounded-full"},at={class:"text-3xl md:text-4xl lg:text-5xl font-bold text-gray-900 mb-6 leading-tight"},rt={class:"flex flex-wrap items-center gap-6 text-gray-500 mb-6"},lt={class:"flex items-center space-x-2"},it={class:"flex items-center space-x-2"},dt={class:"flex items-center space-x-2"},ut={class:"bg-gray-50 py-8"},ct={class:"cief-container"},mt={class:"grid grid-cols-1 lg:grid-cols-3 gap-8"},pt={class:"lg:col-span-3 bg-white"},xt={class:"rounded-lg shadow-sm p-10 max-w-4xl mx-auto"},gt={class:"prose prose-lg max-w-none"},vt=["innerHTML"],ft={key:0,class:"mt-8 pt-8 border-t border-gray-200"},ht={class:"flex flex-wrap gap-2"},wt=L({__name:"[id]",setup(yt){const c=N(),b=S(),d=V(),m=c.params.id;c.query.token;const n=g(null),p=g(!1),u=g(!1),_=async()=>{if(!m){u.value=!0;return}try{p.value=!0,u.value=!1;const s=await O.getNewsPreview(m);n.value={id:s.data.newsId,title:s.data.titleZh,content:s.data.contentZh,summary:s.data.contentZh,coverImage:s.data.webCover,author:s.data.createBy,publishDate:s.data.publishTime,newsId:s.data.newsId,category:null,tags:[],viewCount:0,isPublished:s.data.status==="0",isFeatured:!0,slug:"",createdAt:s.data.createTime||new Date().toISOString(),updatedAt:s.data.updateTime||new Date().toISOString(),status:s.data.status}}catch(s){console.error("获取新闻详情失败:",s),u.value=!0,n.value=null}finally{p.value=!1}};A(()=>c.params.id,(s,e)=>{s&&s!==e&&_()},{immediate:!0});const C=s=>new Date(s).toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric"}),M=s=>new Date(s).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),j=s=>{switch(s){case"0":return"bg-green-100 text-green-700 text-sm font-medium rounded-full";case"1":return"bg-gray-100 text-gray-700 text-sm font-medium rounded-full";case"2":return"bg-red-100 text-red-700 text-sm font-medium rounded-full";default:return"bg-gray-100 text-gray-700 text-sm font-medium rounded-full"}},z=s=>{switch(s){case"0":return"已发布";case"1":return"草稿";case"2":return"已下线";default:return"未知状态"}},B=()=>{const s=`/admin/news/edit/${m}`;v(s)},T=async()=>{alert("发布功能需要连接后台管理系统")},D=()=>{window.history.length>1?b.back():v(d("/news"))};return H({title:"新闻预览 - 中国国际中文教育基金会",meta:[{name:"robots",content:"noindex, nofollow"},{name:"description",content:"新闻预览页面 - 此内容尚未发布"}]}),(s,e)=>{const f=F;return r(),a("div",Z,[t("div",{class:"preview-bar fixed top-0 left-0 right-0 bg-yellow-500 text-white py-2 px-4 z-50 flex items-center justify-between shadow-lg"},[e[4]||(e[4]=h('<div class="flex items-center space-x-2" data-v-f35587d8><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-f35587d8><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" data-v-f35587d8></path><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" data-v-f35587d8></path></svg><span class="font-medium" data-v-f35587d8>预览模式 - 此内容尚未发布</span></div>',1)),t("div",{class:"flex items-center space-x-3"},[t("button",{onClick:B,class:"flex items-center space-x-1 px-3 py-1 bg-white text-yellow-600 rounded hover:bg-gray-100 transition-colors text-sm"},e[1]||(e[1]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1),t("span",null,"编辑",-1)])),t("button",{onClick:T,class:"flex items-center space-x-1 px-3 py-1 bg-green-600 text-white rounded hover:bg-green-700 transition-colors text-sm"},e[2]||(e[2]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1),t("span",null,"发布",-1)])),t("button",{onClick:D,class:"flex items-center space-x-1 px-3 py-1 bg-red-600 text-white rounded hover:bg-red-700 transition-colors text-sm"},e[3]||(e[3]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),t("span",null,"关闭",-1)]))])]),e[20]||(e[20]=t("div",{class:"h-12"}
1,null,-1)),o(p)?(r(),a("div",E,e[5]||(e[5]=[t("div",{class:"text-center"},[t("div",{class:"loading-spinner mx-auto mb-4"}),t("p",{class:"text-gray-500"},"加载中...")],-1)]))):o(u)?(r(),a("div",$,[t("div",G,[e[6]||(e[6]=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[7]||(e[7]=t("h1",{class:"text-2xl font-bold text-gray-900 mb-2"},"新闻不存在",-1)),e[8]||(e[8]=t("p",{class:"text-gray-500 mb-6"},"抱歉,您访问的新闻页面不存在或已被删除。",-1)),t("button",{onClick:e[0]||(e[0]=x=>("navigateTo"in s?s.navigateTo:o(v))(o(d)("/news"))),class:"inline-flex items-center px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors"}," 返回新闻列表 ")])])):o(n)?(r(),a("div",U,[t("nav",W,[t("div",X,[t("ol",J,[t("li",null,[w(f,{to:o(d)("/"),class:"hover:text-primary-600"},{default:y(()=>e[9]||(e[9]=[k("首页",-1)])),_:1,__:[9]},8,["to"])]),e[11]||(e[11]=t("li",null,"/",-1)),t("li",null,[w(f,{to:o(d)("/news"),class:"hover:text-primary-600"},{default:y(()=>e[10]||(e[10]=[k("新闻资讯",-1)])),_:1,__:[10]},8,["to"])]),e[12]||(e[12]=t("li",null,"/",-1)),e[13]||(e[13]=t("li",{class:"text-yellow-600 font-medium"},"预览",-1)),o(n).category?(r(),a("li",K,"/")):i("",!0),o(n).category?(r(),a("li",Q,l(o(n).category.name),1)):i("",!0)])])]),t("header",Y,[t("div",tt,[t("div",et,[t("div",st,[e[14]||(e[14]=t("span",{class:"px-3 py-1 bg-yellow-100 text-yellow-700 text-sm font-medium rounded-full border-2 border-yellow-300"}," 🔍 预览模式 ",-1)),o(n).status?(r(),a("span",{key:0,class:I(["ml-2 px-3 py-1",j(o(n).status)])},l(z(o(n).status)),3)):i("",!0)]),o(n).category?(r(),a("div",ot,[t("span",nt,l(o(n).category.name),1)])):i("",!0),t("h1",at,l(o(n).title),1),t("div",rt,[t("div",lt,[e[15]||(e[15]=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,l(o(n).author),1)]),t("div",it,[e[16]||(e[16]=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,l(C(o(n).publishDate)),1)]),t("div",dt,[e[17]||(e[17]=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:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),t("span",null,"创建时间: "+l(M(o(n).createdAt)),1)])])])])]),t("main",ut,[t("div",ct,[t("div",mt,[t("article",pt,[t("div",xt,[t("div",gt,[t("div",{innerHTML:o(n).content},null,8,vt)]),o(n).tags&&o(n).tags.length>0?(r(),a("div",ft,[e[18]||(e[18]=t("h3",{class:"text-lg font-semibold text-gray-900 mb-4"},"相关标签",-1)),t("div",ht,[(r(!0),a(P,null,q(o(n).tags,x=>(r(),a("span",{key:x,class:"px-3 py-1 bg-gray-100 text-gray-700 text-sm rounded-full"},l(x),1))),128))])])):i("",!0),e[19]||(e[19]=h('<div class="mt-8 pt-8 border-t-2 border-yellow-200 bg-yellow-50 rounded-lg p-6" data-v-f35587d8><div class="flex items-start space-x-3" data-v-f35587d8><svg class="w-6 h-6 text-yellow-600 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-f35587d8><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" data-v-f35587d8></path></svg><div data-v-f35587d8><h4 class="font-semibold text-yellow-800 mb-2" data-v-f35587d8>预览提示</h4><ul class="text-sm text-yellow-700 space-y-1" data-v-f35587d8><li data-v-f35587d8>• 当前处于预览模式,内容尚未发布</li><li data-v-f35587d8>• 此页面仅用于预览效果,不会对公众可见</li><li data-v-f35587d8>• 点击右上角&quot;发布&quot;按钮即可正式发布</li><li data-v-f35587d8>• 发布后文章将在新闻列表中显示</li></ul></div></div></div>',1))])])])])])])):i("",!0)])}}}),zt=R(wt,[["__scopeId","data-v-f35587d8"]]);export{zt 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.