Skip to content

Commit a0996bd

Browse files
committed
【优化】移除 env 多余的 VITE_API_BASEPATH 配置项
1 parent f405ac3 commit a0996bd

File tree

10 files changed

+4
-20
lines changed

10 files changed

+4
-20
lines changed

.env.dev

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ VITE_UPLOAD_TYPE=server
1212
# 上传路径
1313
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
1414

15-
# 接口前缀
16-
VITE_API_BASEPATH=/dev-api
17-
1815
# 接口地址
1916
VITE_API_URL=/admin-api
2017

.env.local

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server
1111
# 上传路径
1212
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
1313

14-
# 接口前缀
15-
VITE_API_BASEPATH=/dev-api
16-
1714
# 接口地址
1815
VITE_API_URL=/admin-api
1916

.env.prod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server
1111
# 上传路径
1212
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
1313

14-
# 接口前缀
15-
VITE_API_BASEPATH=
16-
1714
# 接口地址
1815
VITE_API_URL=/admin-api
1916

.env.stage

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server
1111
# 上传路径
1212
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
1313

14-
# 接口前缀
15-
VITE_API_BASEPATH=
16-
1714
# 接口地址
1815
VITE_API_URL=/admin-api
1916

.env.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ VITE_UPLOAD_TYPE=server
1111
# 上传路径
1212
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
1313

14-
# 接口前缀
15-
VITE_API_BASEPATH=
16-
1714
# 接口地址
1815
VITE_API_URL=/admin-api
1916

src/views/mp/components/wx-reply/components/TabImage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import { getAccessToken } from '@/utils/auth'
6363
import { Reply } from './types'
6464
const message = useMessage()
6565
66-
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
66+
const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary'
6767
const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部
6868
6969
const props = defineProps<{

src/views/mp/components/wx-reply/components/TabMusic.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import { Reply } from './types'
6767
6868
const message = useMessage()
6969
70-
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
70+
const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary'
7171
const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部
7272
7373
const props = defineProps<{

src/views/mp/components/wx-reply/components/TabVideo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import { Reply } from './types'
5858
5959
const message = useMessage()
6060
61-
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
61+
const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary'
6262
const HEADERS = { Authorization: 'Bearer ' + getAccessToken() }
6363
6464
const props = defineProps<{

src/views/mp/components/wx-reply/components/TabVoice.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import { getAccessToken } from '@/utils/auth'
6161
import { Reply } from './types'
6262
const message = useMessage()
6363
64-
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
64+
const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-temporary'
6565
const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部
6666
6767
const props = defineProps<{

types/env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ interface ImportMetaEnv {
1717
readonly VITE_APP_DOCALERT_ENABLE: string
1818
readonly VITE_BASE_URL: string
1919
readonly VITE_UPLOAD_URL: string
20-
readonly VITE_API_BASEPATH: string
2120
readonly VITE_API_URL: string
2221
readonly VITE_BASE_PATH: string
2322
readonly VITE_DROP_DEBUGGER: string

0 commit comments

Comments
 (0)