'use strict';

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

import './ComRule.less';

class ComRule extends Component {
  constructor(props) {
    super(props);
    this.state = this.state || { resList: resList,ruleText:"活动规则" };
  }

  componentDidMount(){
      const {rule} = dataCenter.getData("ajaxElement");
    //   this.setState({
    //       ruleText:rule
    //   })
    this.refs.ruleText.innerHTML = rule;
  }

  render() {
    return (
      <div className="huo_dong_gui_ze1 zoom">
        <img className="image" src={this.state.resList['2cdb4f49-0981-45fc-8c7f-e5c16e0d7526'].url} />
        <img className="tuo_yuan7" src={this.state.resList['c1a6ba2f-f012-440a-8e13-5a11ff1bee2f'].url} />
        <img className="tuo_yuan9" src={this.state.resList['28caebe0-9290-49fe-9661-ccc2c9885520'].url} onClick={this.props.closeWin}/>
        <label className="huo_dong_gui_ze2">活动规则</label>
        <label className="huo_dong_gui_zemain" ref="ruleText">
          {/* {this.state.ruleText} */}
        </label>
      </div>
    );
  }
}
export default ComRule;
