king
2023-08-17 c7aece35a62b6e91fd98a625bf0e53f64bfbd18d
src/components/editor/index.jsx
@@ -14,13 +14,6 @@
BraftEditor.use(Table())
let service = ''
if (process.env.NODE_ENV === 'production') {
  service = document.location.origin + '/' + window.GLOB.service
} else {
  service = window.GLOB.location + '/' + window.GLOB.service
}
class NormalEditor extends Component {
  static propTpyes = {
    config: PropTypes.object,
@@ -48,7 +41,7 @@
      if (initVal) {
        try {
          initVal = window.decodeURIComponent(window.atob(initVal))
        } catch {
        } catch (e) {
          initVal = this.props['data-__meta'].initialValue || null
        }
      }
@@ -72,7 +65,7 @@
      if (encryption === 'true') {
        try {
          val = window.btoa(window.encodeURIComponent(val))
        } catch {
        } catch (e) {
          val = editorState.toHTML()
        }
      }
@@ -87,13 +80,14 @@
    form.append('file', _param.binary)
    form.append('fileMd5', params.file.fileMd5)
    form.append('shardingMd5', _param.chunkMd5)
    form.append('baseDomain', service)
    form.append('baseDomain', window.GLOB.baseurl)
    form.append('rootPath', 'Content/images/upload/')
    form.append('fileName', params.file.fileName)
    form.append('fileExt', params.file.fileType)
    form.append('shardingCnt', _param.chunks)
    form.append('shardingNo', _param.chunk)
    form.append('LoginUID', sessionStorage.getItem('LoginUID') || '')
    form.append('UserID', sessionStorage.getItem('UserID') || '')
    Api.getLargeFileUpload(form).then(res => {
      if (res.status) {