forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-12 2d2efba54e188738ca3dba9820df14f58221487f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-02-14 15:51:55
 * @LastEditTime: 2022-03-15 09:34:33
 * @LastEditors: lwh
 * @Version: 1.0.0
 * @Description: 例子
 */
import React, { Component } from 'react';
import './index.less';
import PageHead from '../../components/PageHead';
import { Tabs, Button } from 'antd';
import * as $$ from '../../utils/utility';
import Page from '../../components/PageRouterView';
const { TabPane } = Tabs;
 
function login() {
    return $$.ax.request({ url: 'account/login', type: 'post', data: { userName: '11', password: '22' }, service: 'oper' });
}
class Login extends Component {
    constructor(props) {
        super(props);
        this.config = {};
        this.state = {
            url: '',
        };
    }
    // 登录
    handleLogin = () => {
        // const data = await login();
        //
        this.setState({ url: '/operation/customer' });
    };
 
    render() {
        return (
            <Page url={this.state.url}>
                <PageHead
                    breadcrumbData={[
                        { url: '/operation/customer', title: '客户管理' },
                        { url: '', title: '新增客户' },
                    ]}
                    title="客户管理"
                    otherLayout={
                        <Tabs defaultActiveKey="1">
                            <TabPane tab="Tab 1" key="1" />
                            <TabPane tab="Tab 2" key="2" />
                        </Tabs>
                    }
                />
                <Button onClick={this.handleLogin}>login</Button>
            </Page>
        );
    }
}
 
export default Login;