Commit d50c6c6e by FE

Merge branch 'issue-20190920' into pre

parents a02090ad 2c214b02
...@@ -7,10 +7,10 @@ const CAPTCHAID = '6b0f5f6c8f334f3693ee754ba5692e36' ...@@ -7,10 +7,10 @@ const CAPTCHAID = '6b0f5f6c8f334f3693ee754ba5692e36'
class Captcha extends Component { class Captcha extends Component {
componentDidMount() { componentDidMount() {
const {getInstance, handleError, onVerify} = this.props const {getInstance, handleError, onVerify} = this.props
const el = document.getElementById('captcha') const el = document.getElementById('captcha');
el && initCaptcha(function () { el && initCaptcha(function () {
initNECaptcha({ initNECaptcha({
element: '#captcha', element: el,
captchaId: CAPTCHAID, captchaId: CAPTCHAID,
mode: 'float', mode: 'float',
width: 'auto', width: 'auto',
......
...@@ -26,7 +26,8 @@ class Classify extends Component { ...@@ -26,7 +26,8 @@ class Classify extends Component {
allClass: [], allClass: [],
data: [], data: [],
activeTab: decodeURIComponent(getParam('name')), activeTab: decodeURIComponent(getParam('name')),
isLoading: true isLoading: true,
top: 44
} }
} }
...@@ -34,6 +35,11 @@ class Classify extends Component { ...@@ -34,6 +35,11 @@ class Classify extends Component {
componentDidMount() { componentDidMount() {
this.getTabs() this.getTabs()
this.getList() this.getList()
const el = document.querySelector('.search-nav');
this.setState({
top: el.offsetHeight
});
} }
componentWillUnmount() { componentWillUnmount() {
...@@ -173,7 +179,7 @@ class Classify extends Component { ...@@ -173,7 +179,7 @@ class Classify extends Component {
<Sticky> <Sticky>
{({ style }) => { {({ style }) => {
return ( return (
<div style={{ ...style, top: '44px', zIndex: 1 }}> <div style={{ ...style, top: `${this.state.top}px`, zIndex: 1 }}>
<Tabs.DefaultTabBar {...props} /> <Tabs.DefaultTabBar {...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