forked from nsjcy/frontEnd/nsjcy

bug
liuwh
2020-03-24 51351c2d8c7297cb3f96e572c0e1a110ce8a5073
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
 * 柯礼钦<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}/>
    );
  }
 
}