<template>
  <div id="notice">
<!--    <div style="background-color: #00ff80; flex: 1; justify-content: center; align-items: center">-->
<!--      <wang-editor-ex-display-->
<!--          :contentText="autoDialog.detail.msgContent"-->
<!--          :height="500"-->
<!--      ></wang-editor-ex-display>-->
<!--    </div>-->
    <div id="app">
      <ckeditor :editor="editor" v-model="editorData" :config="editorConfig"></ckeditor>
    </div>
  </div>
</template>

<script>
// import wangEditorExDisplay from '@/components/wangEditorEx/display'
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
import { AxiosRequestData } from '@/data/axios_request'

export default {
  name: 'notice',
  // components: {
  //   'wang-editor-ex-display': wangEditorExDisplay
  // },
  data() {
    return {
      token: null,
      editor: ClassicEditor,
      editorData: '',
      editorConfig: {
        // The configuration of the editor.
      },
    }
  },

  async created() {
    const account = localStorage.getItem('account')
    const msgId = localStorage.getItem('msgId')
    await this.getMsgInfo(account, msgId)
  },
  methods: {
    // 获取发票信息
    async getMsgInfo(account, msgId) {
      if (account && msgId) {
        const url = '/auth/user/msg/findMsgDetail'
        let response = await AxiosRequestData(
            url,
            this.token,
            {
              mobile: account,
              msgId: msgId,
              reqChannel: 3
            },
            false,
            2
        )
        console.log(response)
        if (response) {
          console.log(response)
          if (response.code === 0) {
            this.editorData = response.data.msgContent
          }
        }
      }
    }
  }
}
</script>

<style scoped>

</style>
