help-center-detail.fb3e21b8.js 1.7 KB

1
  1. import{d as u,y as d,w as c,j as t,g as p,A as h}from"./ResizeObserver.es.b7226882.js";import{N as T,C as g}from"./index.969bba7f.js";import{u as f}from"./hooks.a4ed20cb.js";import"./index.20c0f4c5.js";import"./index.cf00521e.js";import{I as y}from"./index.e4fc81ba.js";import{s as n}from"./help-center-detail.module.308a809a.js";var H=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,s=await d.get("/api-cms/helpCenterContent/get/"+e.id),{title:a,releaseTime:o,createTime:l,content:r,catalogId:i}=s.data;this.detail={title:a,createTime:i==2?c(o).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{}f("\u5E2E\u52A9\u4E2D\u5FC3")},methods:{onShowImg(e){const{localName:s}=e.srcElement;if(s!=="img")return;let a=0;const o=document.querySelectorAll(".msgWrap img"),l=Array.from(o).map((r,i)=>(e.srcElement==r&&(a=i),r.src));y({images:l,startPosition:a,closeable:!0})}},render(){return t("div",{class:n["help-center-detail"]},[this.catalogType==="ANALYSIS"?t(T,{title:p.helpItemTitle||this.documentTitle,"left-arrow":!0,fixed:!0,"onClick-left":()=>{this.$router.back()}},null):t(g,{title:this.documentTitle},null),t("h2",null,[this.detail.title]),t("div",{class:n.titleInfo},[t("p",null,[h("\u9177\u4E50\u79C0")]),t("p",null,[this.detail.createTime])]),t("div",{class:[n.imgContent,"msgWrap"],innerHTML:this.detail.content},null)])}});export{H as default};