"use strict";

import React, { Component } from "react";
import resList from "../../resconfig/resList";

import "./comrulep.less";

class Comrulep extends Component {
  constructor(props) {
    super(props);
    this.state = this.state || { resList: resList };
  }
  componentDidMount() {
    console.log('rule')
    // let msg = this.props.rule
    // document.getElementsByClassName("rule")[0].innerHTML = msg
  }
  render() {
    const { rule, onClose } = this.props;
    return (
      <div className="rulep">
        <div className="bgModal" />
        <img
          className="rulebg"
          src={this.state.resList["bf406e35-b4dc-49bb-aaec-1a97a58474d4"].url}
        />
        <div className="rule" dangerouslySetInnerHTML={{ __html: rule }} />
        <img
          className="ruleclo"
          onClick={onClose}
          src={this.state.resList["c9098829-9dc3-4561-887d-e2a9b3a60e43"].url}
        />
      </div>
    );
  }
}
export default Comrulep;
