1 |
- import{r as m}from"./index.3a043152.js";import{d,g as c,aj as u,a as e,j as p}from"./vendor.d0a55a8b.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,i=await m.get("/api-cms/news/query/"+t.id);let{title:a,createTime:r,content:s}=i.data;this.detail={title:a,createTime:c(r).format("YYYY-MM-DD HH:mm:ss"),content:s}}catch{}},methods:{onShowImg(t){const{localName:i}=t.srcElement;if(i!=="img")return;let a=0;const r=document.querySelectorAll(".msgWrap img");let s=Array.from(r).map((o,l)=>(t.srcElement==o&&(a=l),o.src));u({images:s,startPosition:a,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};
|