chore: proxy
parent
89941c44fb
commit
227ee04b4f
|
@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
|
|||
# 本地开发代理,可以解决跨域及多地址代理
|
||||
# 如果接口地址匹配到,则会转发到http://localhost:3000,防止本地出现跨域问题
|
||||
# 可以有多个,注意多个不能换行,否则代理将会失效
|
||||
VITE_PROXY = [["/dev-api","http://localhost:48080"],["/upload","http://localhost:48080/admin-api/infra/file/upload"]]
|
||||
VITE_PROXY = [["/dev-api","http://localhost:48080/admin-api"],["/upload","http://localhost:48080/admin-api/infra/file/upload"]]
|
||||
# VITE_PROXY=[["/api","http://vben.xingyuv.com/test"]]
|
||||
|
||||
# 是否删除Console.log
|
||||
|
@ -16,7 +16,7 @@ VITE_DROP_CONSOLE = false
|
|||
# 接口地址
|
||||
VITE_GLOB_BASE_URL = "http://localhost:48080"
|
||||
# 如果没有跨域问题,直接在这里配置即可
|
||||
VITE_GLOB_API_URL = /admin-api
|
||||
VITE_GLOB_API_URL = /dev-api
|
||||
|
||||
# 文件上传接口 可选
|
||||
VITE_GLOB_UPLOAD_URL = /upload
|
||||
|
|
|
@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
|
|||
# 本地开发代理,可以解决跨域及多地址代理
|
||||
# 如果接口地址匹配到,则会转发到http://localhost:3000,防止本地出现跨域问题
|
||||
# 可以有多个,注意多个不能换行,否则代理将会失效
|
||||
VITE_PROXY = [["/dev-api","http://api-dashboard.yudao.iocoder.cn"],["/upload","http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload"]]
|
||||
VITE_PROXY = [["/dev-api","http://api-dashboard.yudao.iocoder.cn/admin-api"],["/upload","http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload"]]
|
||||
# VITE_PROXY=[["/api","http://vben.xingyuv.com/test"]]
|
||||
|
||||
# 是否删除Console.log
|
||||
|
@ -16,7 +16,7 @@ VITE_DROP_CONSOLE = false
|
|||
# 接口地址
|
||||
VITE_GLOB_BASE_URL = "http://api-dashboard.yudao.iocoder.cn"
|
||||
# 如果没有跨域问题,直接在这里配置即可
|
||||
VITE_GLOB_API_URL = /admin-api
|
||||
VITE_GLOB_API_URL = /dev-api
|
||||
|
||||
# 文件上传接口 可选
|
||||
VITE_GLOB_UPLOAD_URL = /upload
|
||||
|
|
|
@ -6,7 +6,6 @@ import { getAppEnvConfig } from '@/utils/env'
|
|||
export const useGlobSetting = (): Readonly<GlobConfig> => {
|
||||
const {
|
||||
VITE_GLOB_APP_TITLE,
|
||||
VITE_GLOB_BASE_URL,
|
||||
VITE_GLOB_API_URL,
|
||||
VITE_GLOB_APP_SHORT_NAME,
|
||||
VITE_GLOB_API_URL_PREFIX,
|
||||
|
@ -24,7 +23,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
|
|||
// Take global configuration
|
||||
const glob: Readonly<GlobConfig> = {
|
||||
title: VITE_GLOB_APP_TITLE,
|
||||
apiUrl: VITE_GLOB_BASE_URL + VITE_GLOB_API_URL,
|
||||
apiUrl: VITE_GLOB_API_URL,
|
||||
shortName: VITE_GLOB_APP_SHORT_NAME,
|
||||
urlPrefix: VITE_GLOB_API_URL_PREFIX,
|
||||
uploadUrl: VITE_GLOB_UPLOAD_URL,
|
||||
|
|
|
@ -7,7 +7,5 @@
|
|||
import { ref } from 'vue'
|
||||
import { IFrame } from '@/components/IFrame'
|
||||
|
||||
const BASE_URL = import.meta.env.VITE_GLOB_BASE_URL
|
||||
// const src = ref(BASE_URL + '/doc.html')
|
||||
const src = ref(BASE_URL + '/druid/index.html')
|
||||
const src = ref(import.meta.env.VITE_GLOB_BASE_URL + '/druid/index.html')
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,5 @@
|
|||
import { ref } from 'vue'
|
||||
import { IFrame } from '@/components/IFrame'
|
||||
|
||||
const BASE_URL = import.meta.env.VITE_GLOB_BASE_URL
|
||||
// const src = ref(BASE_URL + '/doc.html')
|
||||
const src = ref(BASE_URL + '/admin/applications')
|
||||
const src = ref(import.meta.env.VITE_GLOB_BASE_URL + '/admin/applications')
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,5 @@
|
|||
import { ref } from 'vue'
|
||||
import { IFrame } from '@/components/IFrame'
|
||||
|
||||
const BASE_URL = import.meta.env.VITE_GLOB_BASE_URL
|
||||
// const src = ref(BASE_URL + '/doc.html')
|
||||
const src = ref(BASE_URL + '/swagger-ui')
|
||||
const src = ref(import.meta.env.VITE_GLOB_BASE_URL + '/swagger-ui')
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue