获取project为null时无法找到页面问题

This commit is contained in:
dong 2023-04-25 16:22:30 +08:00
parent 2d15eee9f8
commit 7c46ad5c62

View File

@ -14,7 +14,7 @@ const whiteList = ['/login', '/design/login', '/loginNew', '/gzzbxy/relay', '/au
function getRouteInfo(to) {
let loginPath = '';
const markKey = store.state.projectConfig.markKey || getSessionStorage('project');
loginPath = markKey == 'login' ? '/login' : '/login?project=' + markKey;
loginPath = !markKey || markKey == 'login' ? '/login' : '/login?project=' + markKey;
if (to.query.projectDevice && to.query.type && loginPath.includes('?')) {
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
} else if (to.query.projectDevice && to.query.type) {