diff --git a/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js b/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js index 59a902b3..3f665fc6 100644 --- a/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js +++ b/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js @@ -41,6 +41,7 @@ export default class bottomBar extends React.Component { } } componentWillReceiveProps(nextProps){ + console.log(44,nextProps); let navList=nextProps.bottomBarConfig.navlist; let naVisual=navList.filter(item=>item.iswitch); this.setState({navList:naVisual}); @@ -48,7 +49,18 @@ export default class bottomBar extends React.Component { clickIcon(e,index){ this.setState({active:index}); } + componentDidMount(){ + console.log(53); + 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}); + } + } render() { + console.log(53,this.state); let active=this.state.active; return (