import{r as m}from"./index.3d95a92c.js";import{d,g as c,ap as u,a as e,j as p}from"./vendor.a0144ce9.js";/* empty css               *//* empty css               *//* empty css                */import{s as n}from"./help-center-detail.module.bdc7eed4.js";var x=d({name:"theory-detail",data(){return{detail:{title:"",createTime:"",content:""}}},async mounted(){try{const t=this.$route.query,r=await m.get("/api-cms/news/query/"+t.id);let{title:i,createTime:s,content:a}=r.data;this.detail={title:i,createTime:c(s).format("YYYY-MM-DD HH:mm:ss"),content:a}}catch{}},methods:{onShowImg(t){const{localName:r}=t.srcElement;if(r!=="img")return;let i=0;const s=document.querySelectorAll(".msgWrap img");let a=Array.from(s).map((o,l)=>(t.srcElement==o&&(i=l),o.src));u({images:a,startPosition:i,closeable:!0})}},render(){return e("div",{class:n["help-center-detail"]},[e("h2",null,[this.detail.title]),e("div",{class:n.titleInfo},[e("p",null,[p("\u9177\u4E50\u79C0")]),e("p",null,[this.detail.createTime])]),e("div",{class:[n.imgContent,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detail.content},null)])}});export{x as default};
