special-detail.6703ef48.js 1.1 KB

1
  1. import{d as m,w as c,u as d,j as e,z as u}from"./index.e6d6174e.js";import{u as p}from"./hooks.00b5b341.js";import"./index.67c54471.js";import"./index.b4a53c6a.js";import{I as f}from"./index.4324e3af.js";import{s as l}from"./help-center-detail.module.53c77e18.js";var w=m({name:"special-detail",data(){return{detail:{title:"",createTime:"",content:""}}},async mounted(){try{const t=this.$route.query,r=await c.get("/api-cms/news/query/"+t.id);let{title:a,createTime:s,content:i}=r.data;this.detail={title:a,createTime:d(s).format("YYYY-MM-DD HH:mm:ss"),content:i}}catch{}p("\u70ED\u95E8\u8D44\u8BAF")},methods:{onShowImg(t){const{localName:r}=t.srcElement;if(r!=="img")return;let a=0;const s=document.querySelectorAll(".msgWrap img");let i=Array.from(s).map((n,o)=>(t.srcElement==n&&(a=o),n.src));f({images:i,startPosition:a,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"],innerHTML:this.detail.content},null)])}});export{w as default};