special-detail.352ea08c.js 1.1 KB

1
  1. import{d as m,b as c,t as d,i as e,w as u}from"./index.2557005b.js";import"./index.ba997053.js";import"./index.061c46ec.js";import{I as p}from"./index.0214317a.js";import{s as l}from"./help-center-detail.module.7a44e510.js";var T=m({name:"special-detail",data(){return{detail:{title:"",createTime:"",content:""}}},async mounted(){try{const t=this.$route.query,a=await c.get("/api-cms/news/query/"+t.id);let{title:i,createTime:s,content:r}=a.data;this.detail={title:i,createTime:d(s).format("YYYY-MM-DD HH:mm:ss"),content:r}}catch{}},methods:{onShowImg(t){const{localName:a}=t.srcElement;if(a!=="img")return;let i=0;const s=document.querySelectorAll(".msgWrap img");let r=Array.from(s).map((o,n)=>(t.srcElement==o&&(i=n),o.src));p({images:r,startPosition:i,closeable:!0})}},render(){return e("div",{class:l["help-center-detail"]},[e("h2",null,[this.detail.title]),e("div",{class:l.titleInfo},[e("p",null,[u("\u9177\u4E50\u79C0")]),e("p",null,[this.detail.createTime])]),e("div",{class:[l.imgContent,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detail.content},null)])}});export{T as default};