add docker support
This commit is contained in:
@ -7,13 +7,14 @@ import { clearToken, getToken, gotoLogin } from '@/utils/login';
|
||||
|
||||
import { IRequestResponse } from './types/http';
|
||||
|
||||
|
||||
/**
|
||||
* @name 全局请求配置
|
||||
* @doc https://umijs.org/docs/max/request#配置
|
||||
*/
|
||||
export const requestConfig: RequestConfig = {
|
||||
// baseURL: 'https://neighbourhood.cn',
|
||||
baseURL: 'http://192.168.60.120:8082',
|
||||
baseURL: (window.ENV?.BASE_URL || 'https://neighbourhood.cn') as string,
|
||||
|
||||
// 错误处理: umi@3 的错误处理方案。
|
||||
errorConfig: {
|
||||
|
7
src/types/global.d.ts
vendored
Normal file
7
src/types/global.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
interface Window {
|
||||
ENV?: {
|
||||
BASE_URL?: string;
|
||||
// 其他环境变量
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user