diff --git a/.env.development b/.env.development index aa56976b5..3f2eed6e5 100644 --- a/.env.development +++ b/.env.development @@ -12,5 +12,3 @@ VUE_APP_BASE_SOCKET_NSP = '/admin' # mock api VUE_APP_MOCK_API = '/mock-api/' -# API -VUE_APP_API_URL = http://29135jo738.zicp.vip/api/v1 diff --git a/.env.production b/.env.production index ffab27bfc..6c5aaadcd 100644 --- a/.env.production +++ b/.env.production @@ -2,7 +2,7 @@ ENV = 'production' # base api -VUE_APP_BASE_API = '/api/admin/' +VUE_APP_BASE_API = 'http://29135jo738.zicp.vip/admin/' VUE_APP_BASE_SOCKET_PATH = '/ws' VUE_APP_BASE_SOCKET_NSP = '/admin' @@ -12,5 +12,3 @@ BASE_URL = /vue3-antd-admin/ # mock api VUE_APP_MOCK_API = '/mock-api/' -# API -VUE_APP_API_URL = http://29135jo738.zicp.vip/api/v1 diff --git a/src/utils/request.ts b/src/utils/request.ts index aec5d2f08..66ea4e3a2 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -21,7 +21,7 @@ export interface RequestOptions { const UNKNOWN_ERROR = '未知错误,请重试'; /** 真实请求的路径前缀 */ -const baseApiUrl = process.env.VUE_APP_API_URL; +const baseApiUrl = process.env.VUE_APP_BASE_API; /** mock请求路径前缀 */ const baseMockUrl = process.env.VUE_APP_MOCK_API;