文件后缀为tsx
发送请求时showLoading(), 请求失败hideLoading()
import ReactDOM from 'react-dom';
import axios from 'axios';
import Qs from "qs";
import {
Spin} from "antd";
const Axios = (url:string,method:any='get',params:{
}={
}, isAuth:boolean=false)=>{
const BaseUrl = process.env.REACT_APP_API_RUL;
const token = localStorage.getItem('__auth_provider_token__');
// let navigate = useNavigate();
if(sessionStorage.getItem("__auth_provider_isLogin__") !== '1' && isAuth && !token){
alert('token失效');
// navigate('/login');
return new Promise((resolve, reject