feat: 修改代理

This commit is contained in:
huanghao1412 2024-01-11 10:44:01 +08:00
parent 540d237a0a
commit 7158c9fd1d
2 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import { useGetMessageByParent } from '@/utils/utils'
const {getMessageByParent} = useGetMessageByParent()
console.log(window.location.origin)
const routerStore = useRouterStore()
getMessageByParent('setCallByParent', (e) => {
if(e.data.type === 'setCallByParent' && e.data.page === 'customLargeScreen') {

View File

@ -22,7 +22,7 @@ export interface MyRequestInstance extends Axios {
const axiosInstance = axios.create({
// baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`,
baseURL: `${import.meta.env.PROD ? window.location.href : ''}${axiosPre}`,
baseURL: `${import.meta.env.PROD ? window.location.origin : ''}${axiosPre}`,
timeout: ResultEnum.TIMEOUT
}) as unknown as MyRequestInstance