1 |
- import{r as m}from"./index.8bc3c9d6.js";import{d as c,h as d,a7 as u,a as e,b as p}from"./vendor.5339f012.js";/* empty css *//* empty css *//* empty css */import{s as n}from"./help-center-detail.module.bbedfc5d.js";var v=c({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:s,content:a}=r.data;this.detail={title:i,createTime:d(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((l,o)=>(t.srcElement==l&&(i=o),l.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{v as default};
|