From 7158c9fd1d10a2f1a66e86e87e68d43374080b3e Mon Sep 17 00:00:00 2001 From: huanghao1412 Date: Thu, 11 Jan 2024 10:44:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 1 + src/api/axios.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 442c1031..ac035805 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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') { diff --git a/src/api/axios.ts b/src/api/axios.ts index 69c3102a..149e103c 100644 --- a/src/api/axios.ts +++ b/src/api/axios.ts @@ -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