From 56e4562dddd30b544a5424f486c6bf2df1eb06ef Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Tue, 8 Aug 2023 16:49:49 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B7=AF=E7=94=B1=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E6=94=B9=E4=B8=BAhash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.development | 3 +-- frontend/.env.production | 3 +-- frontend/config/vite.config.dev.ts | 4 ++-- frontend/src/router/index.ts | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/frontend/.env.development b/frontend/.env.development index 7bcf5a99a3..8f2189536c 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,2 +1 @@ -VITE_API_BASE_URL= 'app' -VUE_APP_Access_Control_Allow_Origin= '*' \ No newline at end of file +VITE_API_BASE_URL= 'front' \ No newline at end of file diff --git a/frontend/.env.production b/frontend/.env.production index 7bcf5a99a3..dc15ecfd05 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -1,2 +1 @@ -VITE_API_BASE_URL= 'app' -VUE_APP_Access_Control_Allow_Origin= '*' \ No newline at end of file +VITE_API_BASE_URL= '' \ No newline at end of file diff --git a/frontend/config/vite.config.dev.ts b/frontend/config/vite.config.dev.ts index bd65bc96f1..5e4cc7be25 100644 --- a/frontend/config/vite.config.dev.ts +++ b/frontend/config/vite.config.dev.ts @@ -12,10 +12,10 @@ export default mergeConfig( strict: true, }, proxy: { - '/app': { + '/front': { target: 'http://172.16.200.18:8081/', changeOrigin: true, - rewrite: (path: string) => path.replace(/^\/app/, ''), + rewrite: (path: string) => path.replace(/^\/front/, ''), }, }, }, diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 1d7df308c7..1a124d0343 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -1,4 +1,4 @@ -import { createRouter, createWebHistory } from 'vue-router'; +import { createRouter, createWebHashHistory } from 'vue-router'; import NProgress from 'nprogress'; // progress bar import 'nprogress/nprogress.css'; @@ -9,7 +9,7 @@ import createRouteGuard from './guard'; NProgress.configure({ showSpinner: false }); // NProgress Configuration const router = createRouter({ - history: createWebHistory(), + history: createWebHashHistory(), routes: [ { path: '/',