chore: 路由模式改为hash
This commit is contained in:
parent
4d6d23c4ac
commit
56e4562ddd
|
@ -1,2 +1 @@
|
|||
VITE_API_BASE_URL= 'app'
|
||||
VUE_APP_Access_Control_Allow_Origin= '*'
|
||||
VITE_API_BASE_URL= 'front'
|
|
@ -1,2 +1 @@
|
|||
VITE_API_BASE_URL= 'app'
|
||||
VUE_APP_Access_Control_Allow_Origin= '*'
|
||||
VITE_API_BASE_URL= ''
|
|
@ -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/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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: '/',
|
||||
|
|
Loading…
Reference in New Issue