Commit 8aa1fe720cbcbe2fa1f76c0045f86f283a609708
1 parent
134b3e60
fix(preview) update preview iframe origin
Showing
1 changed file
with
1 additions
and
2 deletions
front-end/h5/src/components/core/editor/modals/preview.vue
| 1 | <script> | 1 | <script> |
| 2 | import { mapActions } from 'vuex' | 2 | import { mapActions } from 'vuex' |
| 3 | import QRCode from 'qrcode' | 3 | import QRCode from 'qrcode' |
| 4 | -import { API_ORIGIN } from '../../../../constants/api.js' | ||
| 5 | 4 | ||
| 6 | export default { | 5 | export default { |
| 7 | props: { | 6 | props: { |
| @@ -64,7 +63,7 @@ export default { | @@ -64,7 +63,7 @@ export default { | ||
| 64 | }, | 63 | }, |
| 65 | postMessage2Iframe (message) { | 64 | postMessage2Iframe (message) { |
| 66 | let iframeWin = document.getElementById('iframe-for-preview').contentWindow | 65 | let iframeWin = document.getElementById('iframe-for-preview').contentWindow |
| 67 | - iframeWin.postMessage(message, API_ORIGIN) | 66 | + iframeWin.postMessage(message, window.location.origin) |
| 68 | }, | 67 | }, |
| 69 | openNewTab () { | 68 | openNewTab () { |
| 70 | window.open(this.releaseUrl) | 69 | window.open(this.releaseUrl) |