'use strict';

import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import ViewCtrl from '../../util/viewCtrl';

import './ComGameFinalClear.less';

class ComGameFinalClear extends Component {
    constructor(props) {
        super(props);
        this.state = this.state || { resList: resList, prizeImg:'' };
    }

    componentDidMount() {
        const { imgUrl,title } = this.props.data.lottery;
        this.setState({
            prizeImg:imgUrl
        })

    }

    showIndex() {
        this.props.closeWin();
        ViewCtrl.changePage();
    }

    render() {
        return (
            <div className="gong_xi_ni zoom">
                <img className="dan_chuang_bei_jing4" src={this.state.resList['e34fa1ff-c46e-4a73-b778-03790f7a66bb'].url} />
                <img className="guan_bi_an_niu3" src={this.state.resList['28caebe0-9290-49fe-9661-ccc2c9885520'].url} onClick={this.showIndex.bind(this)} />
                <img className="ling_qu_an_niu"  src={this.state.resList['c6574000-2e9f-4ac0-8de9-4503598127d1'].url} onClick={this.showIndex.bind(this)} />
                <div className="ju_xing2" />
                <img className="myPrize" src={this.state.prizeImg}  />
                {/* <label className="prize_thanks" style={!this.state.isPrize?{display:""}:{display:"none"}}>谢谢参与</label> */}
                <label className="gong_xi_ni_chuang_guan_cheng_gong_huo_de">恭喜你<br />闯关成功，获得</label>
            </div>
        );
    }
}
export default ComGameFinalClear;
