This commit is contained in:
PC-202306242200\Administrator
2024-09-10 17:53:46 +08:00
parent 229803dd1f
commit 0e66fbb8b9
3 changed files with 92 additions and 90 deletions

View File

@@ -3,6 +3,8 @@ import type { RequestConfig } from '@umijs/max';
import { message, notification } from 'antd';
import { history, useModel } from '@umijs/max';
import { stringify } from 'querystring';
import proxy from '../config/proxy';
const { REACT_APP_ENV = 'dev' } = process.env;
// 错误处理方案: 错误类型
enum ErrorShowType {
SILENT = 0,
@@ -125,7 +127,7 @@ export const errorConfig: RequestConfig = {
// 拦截请求配置,进行个性化处理。
const Authorization = localStorage.getItem('token') || ''
const headers = { Authorization };
const url = config?.url;
const url = 'https://iadminapi.zhongshuai2023.com';
return { ...config, url, headers };
},