diff --git a/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js b/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js index 96c46dd6..77c2f3b0 100644 --- a/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js +++ b/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js @@ -49,27 +49,25 @@ export default class bottomBar extends React.Component { this.setState({active:index}); } componentDidMount(){ - let config = JSON.parse(sessionStorage.getItem('editorConfig')); - if (config && config.coupon && config.coupon.product_list) { - let { navlist, defaultText, selectText, background, iswitch } = config.coupon.product_list.bottomBar; - this.setState({ defaultText, selectText, background, iswitch }); - let naVisual=navlist.filter(item=>item.iswitch); - this.setState({navList:naVisual}); - } + let config = JSON.parse(sessionStorage.getItem('editorConfig')); + let { navlist, defaultText, selectText, background, iswitch } = this.props.bottomBarConfig?this.props.bottomBarConfig:config.coupon.product_list.bottomBar; + this.setState({ defaultText, selectText, background, iswitch }); + let naVisual=navlist.filter(item=>item.iswitch); + this.setState({navList:naVisual}); } render() { let active=this.state.active; return (