|
@@ -1,5 +1,5 @@
|
|
|
import { RouteRecordRaw, createRouter, createWebHashHistory } from "vue-router";
|
|
|
-import { UserStatus, logintAuth, userStatus } from "./store/user";
|
|
|
+import { UserStatus, logintAuth, userStatus, isSuper } from "./store/user";
|
|
|
import { watch, watchEffect } from "vue";
|
|
|
|
|
|
export const COORD_NAME = "map-coord";
|
|
@@ -138,6 +138,7 @@ const routes: RouteRecordRaw[] = [
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ { path: '/:pathMatch(.*)*', component: import("@/view/layout/nav.vue") },
|
|
|
];
|
|
|
|
|
|
export const findRoute = (
|
|
@@ -201,6 +202,15 @@ router.beforeEach((to, _, next) => {
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
+ // organization
|
|
|
+ if (to.name === "organization") {
|
|
|
+ console.log('isSuper-organization', isSuper.value)
|
|
|
+ if (!isSuper.value) {
|
|
|
+ router.replace({ name: "scene" });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (to.name === "map") {
|
|
|
router.replace({ name: COORD_NAME, params: to.params });
|
|
|
} else if (to.name === "query-map") {
|