Commit 3b1638c9 authored by 熊成伟's avatar 熊成伟

debug

parent 1b2c6202
Pipeline #16496 passed with stages
in 1 minute
import React, {useEffect} from 'react'; import React, {useEffect, useState} from 'react';
import Footer from './Footer' import Footer from './Footer'
import {withRouter} from 'react-router-dom' import {withRouter} from 'react-router-dom'
import './index.less' import './index.less'
...@@ -37,10 +37,12 @@ const CommonLayout = (props) => { ...@@ -37,10 +37,12 @@ const CommonLayout = (props) => {
window.addEventListener('resize', () => resize(defaultH)); window.addEventListener('resize', () => resize(defaultH));
return () => window.removeEventListener('resize', resize); return () => window.removeEventListener('resize', resize);
}, []); }, []);
const [bar, setBar] = useState(false);
useEffect(() => { useEffect(() => {
const query = queryString.parse(props.location.search); const query = queryString.parse(props.location.search);
const keys = Object.keys(query); const keys = Object.keys(query);
keys.length > 0 && query.token && localStorage.setItem('token', query.token); keys.length > 0 && query.token && localStorage.setItem('token', query.token);
keys.length > 0 && query.notabar && setBar(query.notabar === 'true')
}, []); }, []);
return ( return (
...@@ -50,7 +52,8 @@ const CommonLayout = (props) => { ...@@ -50,7 +52,8 @@ const CommonLayout = (props) => {
{props.children} {props.children}
</div> </div>
</div> </div>
<Footer {...props}/> {!bar && <Footer {...props}/>}
</div> </div>
); );
}; };
......
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