chore: 路由模式改为hash
This commit is contained in:
parent
4d6d23c4ac
commit
56e4562ddd
|
@ -1,2 +1 @@
|
||||||
VITE_API_BASE_URL= 'app'
|
VITE_API_BASE_URL= 'front'
|
||||||
VUE_APP_Access_Control_Allow_Origin= '*'
|
|
|
@ -1,2 +1 @@
|
||||||
VITE_API_BASE_URL= 'app'
|
VITE_API_BASE_URL= ''
|
||||||
VUE_APP_Access_Control_Allow_Origin= '*'
|
|
|
@ -12,10 +12,10 @@ export default mergeConfig(
|
||||||
strict: true,
|
strict: true,
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/app': {
|
'/front': {
|
||||||
target: 'http://172.16.200.18:8081/',
|
target: 'http://172.16.200.18:8081/',
|
||||||
changeOrigin: true,
|
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 from 'nprogress'; // progress bar
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import createRouteGuard from './guard';
|
||||||
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHashHistory(),
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
|
|
Loading…
Reference in New Issue