{"size": 1304, "ext": "js", "max_stars_repo_path": "demo/demolist/Demo1.js", "max_stars_repo_name": "tinper-acs/ac-progress-bar", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "demo/demolist/Demo1.js", "max_issues_repo_name": "tinper-acs/ac-progress-bar", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "demo/demolist/Demo1.js", "max_forks_repo_name": "tinper-acs/ac-progress-bar", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.8771929825, "max_line_length": 183, "alphanum_fraction": 0.527607362}
/**
 *
 * @title 应用组件名称
 * @description 应用组件描述, 自定义check方法
 *
 */

import React, { Component } from 'react';
import ProgressBarDiwork from '../../src/index';
 class Demo1 extends Component {
    
    constructor(props){
        super(props);
        this.state = {
            now:false,
        }
        this.timer = 0;
    }

    setStartFunc = () =>{
        this.setState({
            now:true
        })
    }
    
    loadingOverFunc=() =>{
        window.location.href="http://www.baidu.com"
    }

    checkFunc = (tenantId,loadingFunc,successFunc) =>{
        console.log(tenantId);
        ++this.timer;
        let self = this;
        if(this.timer<10){
            setTimeout(function () {
                loadingFunc(tenantId);
                self.checkFunc(tenantId,loadingFunc,successFunc) 
            }, 1000)
        }else{
            successFunc();
        }
        
    }


    render () {
        return (
            <div className="demoPadding">
                <div className="start_button" onClick={this.setStartFunc}>开始按钮</div>
                <ProgressBarDiwork className={'32'} check={this.checkFunc} loadingOverFunc={this.loadingOverFunc} tenantId={'1'} startFlag={this.state.now} loadingDesc={'正在配置团队信息…'}/>
            </div>
        )
    }
}

export default Demo1;
