lcw
This commit is contained in:
@ -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",
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user