This commit is contained in:
lcw
2025-09-17 18:28:55 +08:00
parent 2d40736a96
commit 946549f94e
406 changed files with 125301 additions and 12 deletions

View File

@ -101,7 +101,8 @@ onMounted(() => {
window.map = map;
map.mapboxGLMap.on("load", () => {
map.addWMTSLayer(
"/PGIS_S_TileMapServer/Maps/XZDJ_SL/EzMap",
"/PGIS_S_TileMapServer/Maps/XZDJ_SL/EzMap"
,
{
Service: "getImage",
Type: "RGB",

View File

@ -1,5 +1,6 @@
import router from './router'
import store from './store'
import Base64 from "base-64";
import {
setItem,
getItem,
@ -41,6 +42,7 @@ router.beforeEach(async (to, from, next) => {
}
// 利用 addRoute 循环添加
} else {
const isOatuh = getItem('isOatuh')
// 没有token的情况下可以进入白名单
if (whiteList.indexOf(to.path) > -1) {

View File

@ -486,15 +486,15 @@ const router = createRouter({
routes: [...publicRoutes, ...privateRoutes]
});
// 添加路由守卫
router.beforeEach((to, from, next) => {
const token = store.getters.token;
if (!token && to.path !== '/login') {
next('/login');
} else {
next();
}
});
// // 添加路由守卫
// router.beforeEach((to, from, next) => {
// const token = store.getters.token;
// if (!token && to.path !== '/login') {
// next('/login');
// } else {
// next();
// }
// });
//初始化路由表
export function resetRouter() {
if (store.getters?.routeReady && store.getters?.userInfo?.permission?.menus) {

View File

@ -11,14 +11,13 @@ const loginDialog = ref(false);
const deptList = ref([]);
const store = useStore();
function redirectAuth() {
let token = location.hash.slice(20) || null;
if (token != null) {
token = token.replace(/\ +/g, "");
setItem("SSOTOKEN", token)
handleLogin({ token: token});
} else {
window.location.href = `http://155.240.22.188:9020`;
window.location.href = `http://155.240.22.102:40992`;
}
}