import { Form, Input, Button, message } from 'antd'; import { UserOutlined, LockOutlined } from '@ant-design/icons'; import apiObj from '@api/index'; import './index.less' import loginIcon from '@images/logo1.png' const {post,api,interceptors} = apiObj; function Login({history}) { const user = localStorage.getItem('token'); if(user){ history.push('/manage'); } function onLogin(data){ post(api.login,data).then((res)=>{ if(res.data.code===200){ const data = res.data.data; localStorage.setItem('token',data.token); message.success('登录成功',1); interceptors(); history.push('/choose') }else{ message.error(res.data.msg||'数据有误') } }) } return (
欢迎使用!