From a0996bd0cfb6c001e028b76b227f83c38b9ffd27 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 24 Apr 2024 21:50:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=20env=20=E5=A4=9A=E4=BD=99=E7=9A=84=20VITE=5FAPI=5FBA?= =?UTF-8?q?SEPATH=20=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 3 --- .env.local | 3 --- .env.prod | 3 --- .env.stage | 3 --- .env.test | 3 --- src/views/mp/components/wx-reply/components/TabImage.vue | 2 +- src/views/mp/components/wx-reply/components/TabMusic.vue | 2 +- src/views/mp/components/wx-reply/components/TabVideo.vue | 2 +- src/views/mp/components/wx-reply/components/TabVoice.vue | 2 +- types/env.d.ts | 1 - 10 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.env.dev b/.env.dev index 689718b2..5cce6646 100644 --- a/.env.dev +++ b/.env.dev @@ -12,9 +12,6 @@ VITE_UPLOAD_TYPE=server # 上传路径 VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' -# 接口前缀 -VITE_API_BASEPATH=/dev-api - # 接口地址 VITE_API_URL=/admin-api diff --git a/.env.local b/.env.local index 3b997668..005d2f0d 100644 --- a/.env.local +++ b/.env.local @@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server # 上传路径 VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' -# 接口前缀 -VITE_API_BASEPATH=/dev-api - # 接口地址 VITE_API_URL=/admin-api diff --git a/.env.prod b/.env.prod index 35d729c3..842ba616 100644 --- a/.env.prod +++ b/.env.prod @@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server # 上传路径 VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' -# 接口前缀 -VITE_API_BASEPATH= - # 接口地址 VITE_API_URL=/admin-api diff --git a/.env.stage b/.env.stage index 26f9516b..f7c521bd 100644 --- a/.env.stage +++ b/.env.stage @@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server # 上传路径 VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' -# 接口前缀 -VITE_API_BASEPATH= - # 接口地址 VITE_API_URL=/admin-api diff --git a/.env.test b/.env.test index addbfb4e..7bf1b417 100644 --- a/.env.test +++ b/.env.test @@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server # 上传路径 VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' -# 接口前缀 -VITE_API_BASEPATH= - # 接口地址 VITE_API_URL=/admin-api diff --git a/src/views/mp/components/wx-reply/components/TabImage.vue b/src/views/mp/components/wx-reply/components/TabImage.vue index a2915779..6dbfeed6 100644 --- a/src/views/mp/components/wx-reply/components/TabImage.vue +++ b/src/views/mp/components/wx-reply/components/TabImage.vue @@ -63,7 +63,7 @@ import { getAccessToken } from '@/utils/auth' import { Reply } from './types' const message = useMessage() -const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary' +const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary' const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部 const props = defineProps<{ diff --git a/src/views/mp/components/wx-reply/components/TabMusic.vue b/src/views/mp/components/wx-reply/components/TabMusic.vue index c7caecb9..6421d244 100644 --- a/src/views/mp/components/wx-reply/components/TabMusic.vue +++ b/src/views/mp/components/wx-reply/components/TabMusic.vue @@ -67,7 +67,7 @@ import { Reply } from './types' const message = useMessage() -const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary' +const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary' const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部 const props = defineProps<{ diff --git a/src/views/mp/components/wx-reply/components/TabVideo.vue b/src/views/mp/components/wx-reply/components/TabVideo.vue index 7d67d2fa..adb8fa37 100644 --- a/src/views/mp/components/wx-reply/components/TabVideo.vue +++ b/src/views/mp/components/wx-reply/components/TabVideo.vue @@ -58,7 +58,7 @@ import { Reply } from './types' const message = useMessage() -const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary' +const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary' const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } const props = defineProps<{ diff --git a/src/views/mp/components/wx-reply/components/TabVoice.vue b/src/views/mp/components/wx-reply/components/TabVoice.vue index 5a7a42d5..5dbe9a00 100644 --- a/src/views/mp/components/wx-reply/components/TabVoice.vue +++ b/src/views/mp/components/wx-reply/components/TabVoice.vue @@ -61,7 +61,7 @@ import { getAccessToken } from '@/utils/auth' import { Reply } from './types' const message = useMessage() -const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary' +const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary' const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部 const props = defineProps<{ diff --git a/types/env.d.ts b/types/env.d.ts index baf58957..057b5268 100644 --- a/types/env.d.ts +++ b/types/env.d.ts @@ -17,7 +17,6 @@ interface ImportMetaEnv { readonly VITE_APP_DOCALERT_ENABLE: string readonly VITE_BASE_URL: string readonly VITE_UPLOAD_URL: string - readonly VITE_API_BASEPATH: string readonly VITE_API_URL: string readonly VITE_BASE_PATH: string readonly VITE_DROP_DEBUGGER: string