diff --git a/public/react/src/context/EvaluateSuccessEffectDisplay.js b/public/react/src/context/EvaluateSuccessEffectDisplay.js index f09b6d2f2..7ce321bc2 100644 --- a/public/react/src/context/EvaluateSuccessEffectDisplay.js +++ b/public/react/src/context/EvaluateSuccessEffectDisplay.js @@ -17,7 +17,16 @@ class EvaluateSuccessEffectDisplay extends Component { } componentDidMount() { - + if (this.props.type == 'html') { + const iframe = document.getElementById('_displayIframe') + if (iframe && iframe.contentWindow) { + iframe.contentWindow.open() + iframe.contentWindow.document.write(this.props.iframe_src); + iframe.contentWindow.document.close(); + } else { + console.error('not mounted') + } + } } hidepicture = () => { window.$('#picture_display').hide(); @@ -26,7 +35,7 @@ class EvaluateSuccessEffectDisplay extends Component { // qrcode // const type = 'image' // 'qrcode' const { type, qrcode_str, - answer_picture, orignal_picture, user_picture } = this.props; + answer_picture, orignal_picture, user_picture, contents } = this.props; if (type == 'qrcode') { // 单张图片,比如安卓评测完显示qrcode return ( @@ -71,10 +80,14 @@ class EvaluateSuccessEffectDisplay extends Component {
实际输出
- +