import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Redirect } from 'react-router'; import PropTypes from 'prop-types'; import { Clappr } from 'educoder' import axios from 'axios'; import EffectDisplayContent from './EffectDisplayContent' class EvaluateSuccessEffectDisplay extends Component { constructor(props) { super(props) this.state = { } } componentWillReceiveProps(newProps, newContext) { } componentDidMount() { if (this.props.type == 'html') { const iframe = document.getElementById('_displayIframe') if (iframe && iframe.contentWindow && this.props.iframe_src) { iframe.contentWindow.open() iframe.contentWindow.document.write(this.props.iframe_src); iframe.contentWindow.document.close(); } else { console.error('not mounted') } } } hidepicture = () => { const dom = document.getElementById('picture_display'); ReactDOM.unmountComponentAtNode(dom) // window.$('#picture_display').hide(); window.$('.data-tip-right').hide() } renderContent = () => { // qrcode // const type = 'image' // 'qrcode' const { type, qrcode_str, answer_picture, orignal_picture, user_picture, contents, user_file, answer_file, orignal_file } = this.props; if (type == 'qrcode') { // 单张图片,比如安卓评测完显示qrcode return (
请使用Android手机浏览器扫码查看效果(暂不支持微信、QQ与支付宝扫一扫)
{/*
*/}
原始图片
}实际输出图片
预期输出图片
实际输出
预期输出