import React, { Component } from "react"; import style from "./index.less"; import close from '../../common/images/icon_close.png' import { storageLocal } from "../../utils/tools" class CopyRight extends Component { constructor(props) { super(props); this.showCopyModal = this.showCopyModal.bind(this); this.closeCopyModal = this.closeCopyModal.bind(this); this.showDisclatmerModal = this.showDisclatmerModal.bind(this); this.closeDisclatmerModal = this.closeDisclatmerModal.bind(this); this.disclatmerContent = this.disclatmerContent.bind(this); this.getNewVersion= this.getNewVersion.bind(this); } componentWillMount() { this.props.getDisMessage() } componentDidMount() { this.props.getMessage() } showCopyModal() { this.props.showCopyModal(); if(this.props.copyRight.hasNewVersion) { this.props.closeVersionTip() } } closeCopyModal() { this.props.closeCopyModal(); } showDisclatmerModal(){ this.props.showDisclatmerModal() } closeDisclatmerModal(){ this.props.closeDisclatmerModal() } disclatmerContent() { const { disContent } = this.props.copyRight; // const disclatmer = disContent.data.data[2].description if(disContent.data) { return (
); } } getNewVersion() { const newVersion = storageLocal.get('hasNewVersion') } render() { const { number, date, content, copyVisible, disVisible, disContent, hasNewVersion } = this.props.copyRight; const { showCopyModal, closeCopyModal, showDisclatmerModal, closeDisclatmerModal } = this; const copyContent = content.map(item => { return (
{item.title}
); }); // const disclatmerContent = disContent.map(item => { // return ( //
// {item.title} //
//
// ); // }) return (
版本信息:{" "} {number} {" "} {hasNewVersion && new} ©朗通医疗
免责声明
版本信息
当前版本:{number} {date && date.substring(0, 10)}
{copyContent}
免责声明
{this.disclatmerContent()}
确定
); } } export default CopyRight;