special-detail.543e2e5b.js 1.1 KB

1
  1. import{r as m}from"./index.035040a1.js";import{d as c,g as d,ai as u,a as e,j as p}from"./vendor.75c233d7.js";/* empty css *//* empty css *//* empty css */import{s as n}from"./help-center-detail.module.bdc7eed4.js";var x=c({name:"special-detail",data(){return{detail:{title:"",createTime:"",content:""}}},async mounted(){try{const t=this.$route.query,s=await m.get("/api-cms/news/query/"+t.id);let{title:i,createTime:a,content:r}=s.data;this.detail={title:i,createTime:d(a).format("YYYY-MM-DD HH:mm:ss"),content:r}}catch{}},methods:{onShowImg(t){const{localName:s}=t.srcElement;if(s!=="img")return;let i=0;const a=document.querySelectorAll(".msgWrap img");let r=Array.from(a).map((l,o)=>(t.srcElement==l&&(i=o),l.src));u({images:r,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};