'use strict';

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

import './Comdeng_lu.less';
import ViewCtrl from '../../util/viewCtrl';

class Comdeng_lu extends Component {
  constructor(props) {
    super(props);
    this.state = this.state || { resList: resList };
  }

  goLogin(){
    console.log('调用登录方法');
    if(window['requirelogin']) {
            window['requirelogin']();
    }else if(window['requireLogin']) {
            window['requireLogin']();
    }else{
        ViewCtrl.showToast("未设置登录方法")
    }
    this.props.closeWin();
  }

  render() {
    return (
      <div className="deng_lu zoom">
        <img className="dan_chuang_bei_jing27" src={this.state.resList['0237cc23-40e8-4b81-bd31-441075679811'].url} />
        <img className="guan_bi_an_niu26" src={this.state.resList['28caebe0-9290-49fe-9661-ccc2c9885520'].url} onClick={this.props.closeWin}/>
        <img className="deng_lu_an_niu" src={this.state.resList['80bdddff-fb72-4400-a02e-8afc25167a10'].url} onClick={this.goLogin.bind(this)}/>
        <label className="wei_deng_lulabel">您还未登录哦请先登录</label>
      </div>
    );
  }
}
export default Comdeng_lu;
