import{_ as a}from"./page-meta.a54da57d.js";import{d as e,z as t,I as s,o as l,g as r,e as u,w as c,f as i,l as o,t as m,b as p,F as n,r as d,a as f,p as x,m as _,a3 as v}from"./index-cca0a918.js";import{_ as w}from"./u-parse.e8b46eeb.js";import{_ as h}from"./u-icon.8199a0c5.js";import{_ as y}from"./icon_visit.713e13e8.js";import{b,c as g,d as j}from"./news.fd0d3863.js";import{_ as k}from"./_plugin-vue_export-helper.1b428a4d.js";const $=k(e({__name:"news_detail",setup(e){const k=t({});let $="";const z=async a=>{k.value=await b({id:a})};return s((a=>{$=a.id,z($)})),(e,t)=>{const s=d(f("page-meta"),a),b=x,B=_,F=v,I=d(f("u-parse"),w),A=d(f("u-icon"),h);return l(),r(n,null,[u(s,{"page-style":e.$theme.pageStyle},null,8,["page-style"]),u(b,{class:"news-detail bg-white"},{default:c((()=>[i(" 标题信心 "),u(b,{class:"news-detail-header py-[20rpx] px-[30rpx]"},{default:c((()=>[u(b,{class:"text-3xl font-medium"},{default:c((()=>[o(m(k.value.title),1)])),_:1}),u(b,{class:"flex mt-[20rpx] text-xs"},{default:c((()=>[k.value.author?(l(),p(b,{key:0,class:"mr-[40rpx]"},{default:c((()=>[o("作者: "+m(k.value.author),1)])),_:1})):i("v-if",!0),u(b,{class:"text-muted mr-[40rpx] flex-1"},{default:c((()=>[o(m(k.value.create_time),1)])),_:1}),u(b,{class:"flex items-center text-muted flex-none"},{default:c((()=>[u(B,{src:y,class:"w-[30rpx] h-[30rpx]"}),u(b,{class:"ml-[10rpx]"},{default:c((()=>[o(m(k.value.click),1)])),_:1})])),_:1})])),_:1})])),_:1}),i(" 咨询内容 "),u(b,{class:"news-detail-section bg-white p-[24rpx]"},{default:c((()=>[i(" 摘要 "),k.value.abstract?(l(),p(b,{key:0,class:"summary p-[20rpx] text-base"},{default:c((()=>[u(F,{class:"font-medium"},{default:c((()=>[o("摘要: ")])),_:1}),o(" "+m(k.value.abstract),1)])),_:1})):i("v-if",!0),i(" 内容 "),u(b,{class:"mt-[20rpx]"},{default:c((()=>[u(I,{html:k.value.content},null,8,["html"])])),_:1})])),_:1}),u(b,{class:"panel-btn flex items-center px-[34rpx]",onClick:t[0]||(t[0]=a=>(async a=>{try{k.value.collect?(await g({id:a}),uni.$u.toast("已取消收藏")):(await j({id:a}),uni.$u.toast("收藏成功")),z($)}catch(e){}})(k.value.id))},{default:c((()=>[u(A,{name:k.value.collect?"star-fill":"star",size:"40",color:k.value.collect?"#F7BA47":"#333"},null,8,["name","color"]),u(F,{class:"ml-[10rpx]"},{default:c((()=>[o("收藏")])),_:1})])),_:1})])),_:1})],64)}}}),[["__scopeId","data-v-9e348abe"]]);export{$ as default};
