import React from 'react';
import HeaderComponent from '../../components/CommonComponent/HeaderComponent/HeaderComponent'
import Button from '../../components/CommonComponent/ButtonComponent/ButtonComponent'
require('./index.css');

export default class HomePageContainer extends React.Component{
    constructor(props){
        super(props);
        this.state = {
        }
    }

    componentWillMount(){

    }

    render(){
        let props = this.props;
        let {headerInfo} = props;
        let {taskInfo={}} = headerInfo;
        let buttonStyle={background:'#ff775c',margin:"0 auto",marginTop:'77px'};
        return(
            <div>
                <HeaderComponent
                    showHeader={CONFIG.headerStatus[1]}
                    headerInfo={headerInfo}
                />
                <div className={"homeContainer"} >
                    <img className={"homeIcon"}  src={UTILPATH.localImg.homePage} alt=""/>
                    {
                        taskInfo.area ? <div className={'homeWelcom font30 clo333'} style={{marginTop:'50px'}}>欢迎来到<span className="homeArea font50 colff775c" style={{padding:'0 8px'}}>{taskInfo.area || ''}</span>区</div>
                            : null
                    }
                    <div className={"homeText font42"} style={{fontWeight:'800',marginTop:'20px'}}>下午好, 你辛苦了！</div>
                    <Button text={'开始工作'} btnContainer={'colfff font30'} style={buttonStyle} option={this.start.bind(this)}/>
                </div>
            </div>

        )
    }
    start(){
        console.log('执行 开始工作了')
        let props=this.props;
        props.startTask();
    }
 
}

HomePageContainer.propTypes = {
};

HomePageContainer.defaultProps = {
}