import React from 'react';
import { Button } from 'antd';
import { WeaTools, WeaDialog } from 'ecCom';
import './style/';
class WeaVersion extends React.Component {
state = { visible: false, data: {} };
constructor(props) {
super(props);
this.getButtons = this.getButtons.bind(this);
this.onCancel = this.onCancel.bind(this);
this.onShow = this.onShow.bind(this);
}
render() {
const { data } = this.state;
const { logo, label1, cversion, label2, companyname, label3, website, msg1, msg2, msg3, msg4, label4, copyright } = data;
return (
{label1}
:
{cversion}
{label2}
:
{companyname}
{msg1}
{msg2}
{msg3}
{msg4}
{label4} © {copyright}
);
}
getButtons() {
let buttons = [];
buttons.push();
return buttons;
}
getVersion() {
WeaTools.callApi('/api/portal/systemInfo/getVersion', 'GET', {}).then((result) => {
const { data } = result;
this.setState({ data });
});
}
onCancel() {
this.setState({ visible: false });
}
onShow() {
this.setState({ visible: true });
this.getVersion();
}
}
export default WeaVersion;