import React,{Component} from "react";
import {message, Modal, Spin, Table, Tooltip} from "antd";
import $ from "jquery/src/ajax";
class MainBusinessLog extends Component{
constructor(props) {
super(props);
this.state={
loading: false,
dataSource:[],
columns:[
{
title: '序号',
dataIndex: 'id',
key: 'id',
},
{
title: '内容',
dataIndex: 'remarks',
key: 'remarks',
width:500,
render: text => {
return (
{text}
)
}
},
{
title: '时间',
dataIndex: 'createTimes',
key: 'createTimes',
},
],
}
}
loadData() {
this.setState({
loading: true,
});
$.ajax({
method: 'get',
dataType: "json",
crossDomain: false,
url: globalConfig.context + '/api/admin/customer/userDateLogList',
data:{
uid:this.props.uid
},
success: function(data) {
if(data.error.length === 0){
this.setState({
dataSource: data.data,
});
}else{
message.warning(data.error[0].message);
}
}.bind(this),
}).always(function() {
this.setState({
loading: false
});
}.bind(this));
}
componentDidMount() {
this.loadData();
}
render() {
return (
)
}
}
export default MainBusinessLog;