Skip to content

Commit

Permalink
rm console
Browse files Browse the repository at this point in the history
  • Loading branch information
jljsj33 committed Mar 20, 2020
1 parent 860dd8e commit 840a42b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions site/edit/template/components/Iframe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ class Iframe extends React.Component {

updatePost({ templateData }) {
const { type } = templateData;
console.log('数据加载状态:', templateData.type);
// console.log('数据加载状态:', templateData.type);
if (type === 'success'
&& this.iframe.contentWindow
&& this.iframe.contentWindow.postMessage) {
// 与 iframe 通信;
console.log('与 iframe 通信成功', templateData);
// console.log('与 iframe 通信成功', templateData);
this.iframe.contentWindow.postMessage(templateData, '*');
}
}

getData = () => {
const { dispatch, templateData } = this.props;
console.log('iframe 加载状态:', templateData.type);
// console.log('iframe 加载状态:', templateData.type);
if (templateData.type === 'success') {
this.updatePost(this.props);
} else {
Expand Down
4 changes: 2 additions & 2 deletions site/templates/template/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ class Layout extends React.Component {

messageHandle = (e) => {
// FIXME: need much better assert condition
console.log('预览页接收:', e.data);
// console.log('预览页接收:', e.data);
if (e.data.type && e.data.type.indexOf('webpack') === -1 && e.data.uid) {
/* Object.keys(localStorage).forEach((key) => {
localStorage.removeItem(key);
}); */
console.log('预览页接收成功:', e.data);
// console.log('预览页接收成功:', e.data);
ls.saveTemplate({
id: e.data.uid,
attributes: e.data.data,
Expand Down

0 comments on commit 840a42b

Please sign in to comment.