Commit af6b15c9 authored by wangxuelai's avatar wangxuelai

''

parent 93e7edc5
......@@ -14,6 +14,9 @@
<%= htmlWebpackPlugin.options.files.header.css.map((item) => {
return `<link href="${htmlWebpackPlugin.options.files.CDN}${item}?${Date.now()}" rel="stylesheet">`
}).join('') %>
<%= htmlWebpackPlugin.options.files.header.basejs.map((item) => {
return `<script src="${item}?20191012222" charset="utf-8"></script>`
}).join('') %>
<%= htmlWebpackPlugin.options.files.header.js.map((item) => {
return `<script src="${htmlWebpackPlugin.options.files.CDN}${item}?20191012222" charset="utf-8"></script>`
}).join('') %>
......
......@@ -12,11 +12,12 @@
<![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/ueeditor/ueditor.config.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/ueeditor/ueditor.all.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20191012222" charset="utf-8"></script>
<script src="/js/ueeditor/ueditor.config.js?20191012222" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20191012222" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012222" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20191012222" charset="utf-8"></script>
</head>
</head>
<body>
<div id="root"></div>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1576497359681" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1576501188108" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -48,11 +48,19 @@ class ThemeEditor extends React.Component {
if (this.uEditor) {
this.uEditor.destroy();
}
if (this.timeout2) {
clearTimeout(this.timeout2);
this.timeout2 = '';
}
if (this.timeout1) {
clearTimeout(this.timeout1);
this.timeout1 = '';
}
}
componentDidMount() { // 挂载
const { sid, commentParams } = this.props;
const that = this;
setTimeout(() => {
this.timeout1 = setTimeout(() => {
if (UE && document.getElementById('editor_id')) {
that.uEditor = UE.getEditor('editor_id', {
autoHeightEnabled: false,
......@@ -126,23 +134,26 @@ class ThemeEditor extends React.Component {
],
],
});
that.uEditor.ready(() => {
that.uEditor.setHeight(600);
});
setTimeout(() => {
const { sid, commentParams } = this.props;
if (commentParams.intro && commentParams.intro.length == 1) {
if (commentParams.intro[0].type == 'editor' && commentParams.intro[0].value != '') {
that.uEditor.ready(() => {
that.uEditor.setContent(commentParams.intro[0].value);
});
that.timeout2 = setTimeout(() => {
if (document.getElementById('editor_id')) {
console.log('进来了');
const { sid, commentParams } = that.props;
if (commentParams.intro && commentParams.intro.length == 1) {
if (commentParams.intro[0].type == 'editor' && commentParams.intro[0].value != '') {
that.uEditor.ready(() => {
that.uEditor.setContent(commentParams.intro[0].value);
});
}
}
}
that.uEditor.ready(() => {
that.uEditor.setHeight(600);
that.uEditor.addListener('contentChange', () => {
that.props.uEditorChange(this.uEditor.getContent());
});
});
}, 800);
// this.editor = ue;
that.uEditor.addListener('contentChange', () => {
that.props.uEditorChange(this.uEditor.getContent());
});
}
}, 800);
}
......
......@@ -45,10 +45,12 @@ const devFile ={
"js/json3.min.js",
"js/html5shiv.min.js",
"js/polyfill.js",
"js/ueeditor/ueditor.config.js",
"js/ueeditor/ueditor.all.js",
"lib/vendor.dll.js",
],
],
basejs: [
"/js/ueeditor/ueditor.config.js",
"/js/ueeditor/ueditor.all.js",
],
css: []
},
footer: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment