Commit 7f8348a1 authored by 邓超's avatar 邓超

fix: 修改路由支持直接访问条件

parent 877d802c
Pipeline #51424 passed with stages
in 8 minutes 35 seconds
......@@ -65,7 +65,7 @@ const BasicLayout = props => {
return (
<>
{sessionStorage.getItem('sandbox') == 'true' ? (
{sessionStorage.getItem('_omsticket') == 'd438aaf9578f405299ae740c4eb75aae' ? (
<>{renderRoutes(props.route.routes)}</>
) : (
<ProLayout
......
......@@ -93,7 +93,6 @@ const Map = props => {
const [flag, setFlag] = useState(0);
const mapRef = useRef();
const mapInfo = useRef(null);
const test = [];
useEffect(() => {
GetWebSiteConfig({ client: 'sandbox' }).then(res => {
console.log(res.data[0].mapsettings, 'res.data[0].mapsettings');
......
import RenderAuthorize from '@/components/Authorized/index.jsx';
import { isDev } from './tools.ts';
// const isDev = false;
......@@ -45,16 +44,16 @@ export default Authorized;
// use localStorage to store the authority info, which might be sent from server in actual project.
export function getAuthority(str) {
const isSandBox = getQueryVariable('sandbox');
const sandbox = sessionStorage.getItem('sandbox');
const sandbox = sessionStorage.getItem('_omsticket');
if (!isDev) {
// return [...auth];
// 支持可以指直接访问
if (isSandBox == 'true') {
sessionStorage.setItem('sandbox', isSandBox);
return ['LOGIN', 'admin'];
}
if (sandbox == 'true') {
// if (isSandBox == 'true') {
// sessionStorage.setItem('_omsticket', 'd438aaf9578f405299ae740c4eb75aae');
// return ['LOGIN', 'admin'];
// }
if (sandbox == 'd438aaf9578f405299ae740c4eb75aae') {
return ['LOGIN', 'admin'];
}
return [...auth];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment