Haruka041 commited on
Commit ·
4a7bd3e
1
Parent(s): 2142b71
fix(admin): set router base for /82 deployment
Browse files
monopoly-admin/src/router/index.ts
CHANGED
|
@@ -19,7 +19,10 @@ const routes = [
|
|
| 19 |
];
|
| 20 |
|
| 21 |
|
| 22 |
-
const router = createRouter({
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
router.beforeEach(async (to, form) => {
|
| 25 |
if (!["/login"].includes(to.path) && (!localStorage.getItem("token"))) {
|
|
|
|
| 19 |
];
|
| 20 |
|
| 21 |
|
| 22 |
+
const router = createRouter({
|
| 23 |
+
history: import.meta.env.PROD ? createWebHistory(import.meta.env.BASE_URL) : createWebHashHistory(),
|
| 24 |
+
routes
|
| 25 |
+
});
|
| 26 |
|
| 27 |
router.beforeEach(async (to, form) => {
|
| 28 |
if (!["/login"].includes(to.path) && (!localStorage.getItem("token"))) {
|