From 5692a6c071fdbf996fca2f6d435fbc629574be3c Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Sun, 14 May 2023 00:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AEi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 3 ++- vite.config.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index e680e56..834a290 100644 --- a/src/main.js +++ b/src/main.js @@ -25,7 +25,8 @@ const router = createRouter({ // axios const createAxios = { install(app, options) { - axios.defaults.baseURL = 'http://127.0.0.1:8087/bigdata'; + // axios.defaults.baseURL = 'http://127.0.0.1:8087/bigdata'; + axios.defaults.baseURL = '/bigdata'; axios.defaults.timeout = 20000; app.config.globalProperties.$axios = axios; } diff --git a/vite.config.js b/vite.config.js index 05c1740..4b14147 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,5 +3,6 @@ import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ + base: './', plugins: [vue()], })