import React from 'react';
// import { useRequest } from "@umijs/hooks";
// import axios from 'axios';
import {withRouter} from 'react-router-dom'
import axiosRequest from '../../utils/request';
// import { postRequest } from '../../utils/request';
// import './index.less'

const Login = (props) => {

    axiosRequest({
        method: 'post',
        url: '/idtAppServiceV6/oApp/login?userName=2012012099&clientFlag=123456&password=1&loginType=mobile',
    }).then(res => {
        !res.errorMessage && props.history.push(`/bord/backlog`)
        // setOperates(res.operate || []);
    });

    // const { data, error, loading } = useRequest({
    //     url: '/dgbg/mobileLogin.view',
    //     method: 'post',
    //     // data: {
    //     //     userName: '2012012099',
    //     //     password: '1',
    //     //     clientFlag: 12345
    //     //  },
    // });

    return (
        <div>
            <div className="common-layout-content">
                <div>
                    {props.children}
                </div>

            </div>
        </div>
    );
};

export default withRouter(Login) ;
