help-center-detail.860e5716.js 1.6 KB

1
  1. import{d as u,y as d,w as c,j as t,A as p}from"./ResizeObserver.es.f28023e0.js";import{N as h,C as f}from"./index.bd375ca9.js";import{u as g}from"./hooks.19957bf3.js";import"./index.7a1af785.js";import"./index.966d1893.js";import{I as T}from"./index.d188aaf8.js";import{s as n}from"./help-center-detail.module.ba9372dd.js";var q=u({name:"help-center-detail",data(){const e=this.$route.query;return{catalogType:e.catalogType,documentTitle:e.catalogType==="ANALYSIS"?"\u5E2E\u52A9\u4E2D\u5FC3\u8BE6\u60C5":"",detail:{title:"",createTime:"",content:""}}},async mounted(){try{const e=this.$route.query,o=await d.get("/api-cms/helpCenterContent/get/"+e.id),{title:a,releaseTime:s,createTime:l,content:r,catalogId:i}=o.data;this.detail={title:a,createTime:i==2?c(s).format("YYYY-MM-DD HH:mm:ss"):c(l).format("YYYY-MM-DD HH:mm:ss"),content:r};const m=i==2?"\u516C\u544A\u8BE6\u60C5":"\u3164";this.documentTitle=m,document.title=m}catch{}g("\u5E2E\u52A9\u4E2D\u5FC3")},methods:{onShowImg(e){const{localName:o}=e.srcElement;if(o!=="img")return;let a=0;const s=document.querySelectorAll(".msgWrap img"),l=Array.from(s).map((r,i)=>(e.srcElement==r&&(a=i),r.src));T({images:l,startPosition:a,closeable:!0})}},render(){return t("div",{class:n["help-center-detail"]},[this.catalogType==="ANALYSIS"?t(h,{title:this.documentTitle,"left-arrow":!0,fixed:!0,"onClick-left":()=>{this.$router.back()}},null):t(f,{title:" "},null),t("h2",null,[this.detail.title]),t("div",{class:n.titleInfo},[t("p",null,[p("\u9177\u4E50\u79C0")]),t("p",null,[this.detail.createTime])]),t("div",{class:[n.imgContent,"msgWrap"],innerHTML:this.detail.content},null)])}});export{q as default};