help-center-detail.ea70c988.js 1.1 KB

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