| | |
| | | this.openModal() |
| | | } |
| | | }) |
| | | } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | } else if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | this.setState({}, () => { |
| | | this.loadData() |
| | | }) |
| | |
| | | openModal = () => { |
| | | const { config, data } = this.state |
| | | |
| | | let tip = localStorage.getItem('modal' + config.uuid) |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | | let tip = localStorage.getItem(code) |
| | | |
| | | if ((data.$$uuid && tip === data.$$uuid) || (!data.$$uuid && tip)) return |
| | | |
| | | if (config.wrap.modalContent === 'update') { |
| | | localStorage.setItem('modal' + config.uuid, data.$$uuid || 'true') |
| | | localStorage.setItem(code, data.$$uuid || 'true') |
| | | |
| | | Api.getAppVersion(true) |
| | | } |
| | |
| | | onTipChange = (e) => { |
| | | const { config, data } = this.state |
| | | |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | | if (e.target.checked) { |
| | | localStorage.setItem('modal' + config.uuid, data.$$uuid || 'true') |
| | | localStorage.setItem(code, data.$$uuid || 'true') |
| | | } else { |
| | | localStorage.removeItem('modal' + config.uuid) |
| | | localStorage.removeItem(code) |
| | | } |
| | | } |
| | | |
| | |
| | | destroyOnClose |
| | | > |
| | | <div className="custom-prop-carousel-box" style={config.style}> |
| | | {config.subcards.length > 1 ? <div className="prev" onClick={() => this.node && this.node.prev()}><LeftOutlined /></div> : null} |
| | | {config.subcards.length > 1 ? <div className="next" onClick={() => this.node && this.node.next()}><RightOutlined /></div> : null} |
| | | {config.subcards.length > 1 && config.wrap.autoplay === 'false' ? <div className="prev" onClick={() => this.node && this.node.prev()}><LeftOutlined /></div> : null} |
| | | {config.subcards.length > 1 && config.wrap.autoplay === 'false' ? <div className="next" onClick={() => this.node && this.node.next()}><RightOutlined /></div> : null} |
| | | <Carousel |
| | | autoplay={config.wrap.autoplay !== 'false'} |
| | | dots={config.wrap.dots !== 'false'} |
| | |
| | | {config.wrap.modalContent !== 'update' ? <div className="mk-footer"> |
| | | <Checkbox defaultChecked={false} onChange={this.onTipChange}>不在提醒</Checkbox> |
| | | <Button className="close" onClick={() => this.setState({visible: false})}>立即体验</Button> |
| | | </div> : <div className="mk-footer single"> |
| | | </div> : <div className="mk-footer"> |
| | | <Button className="close" onClick={() => this.setState({visible: false})}>知道了</Button> |
| | | </div>} |
| | | </Modal> |