/**
|
* 柯礼钦<kelq@hugeinfo.com.cn>
|
* 2018年9月4日 16:00
|
*
|
*/
|
|
|
import React from 'react';
|
import ComList from './ComList';
|
import Fetch from '../fetch';
|
export default class List extends React.Component {
|
constructor(props) {
|
super(props);
|
this.state = {
|
total: '',
|
notRead: '',
|
contact: []
|
};
|
}
|
|
componentDidMount() {
|
const {type}=this.props.match.params;
|
}
|
titleOfType(type){
|
if (type === 'onlineAdvice') {
|
return '在线建议';
|
} else if (type === 'onlineComplaints'){
|
return '在线投诉';
|
}else if (type === 'onlineLetter'){
|
return '在线信访';
|
}else if (type === 'another'){
|
return '其他';
|
}
|
return 'Unkown';
|
}
|
render() {
|
const {type}=this.props.match.params;
|
const title=this.titleOfType(type);
|
const { total, notRead, contact } = this.state;
|
const sed = "投诉建议";
|
return (
|
<ComList title={title} local={title} type={type} total={total} notRead={notRead} contact={contact} sed={sed} history ={this.props.history}/>
|
);
|
}
|
|
}
|