|
@@ -43,33 +43,18 @@ function toEditGoods() {
|
43
|
43
|
* @returns
|
44
|
44
|
*/
|
45
|
45
|
|
46
|
|
-const dataSource = [
|
47
|
|
- {
|
48
|
|
- key: '1',
|
49
|
|
- img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
|
50
|
|
- name: '华为P30 Pro',
|
51
|
|
- },
|
52
|
|
- {
|
53
|
|
- key: '2',
|
54
|
|
- img: '',
|
55
|
|
- name: '大米',
|
56
|
|
- },
|
57
|
|
-];
|
58
|
|
-
|
59
|
46
|
const columns = [
|
60
|
47
|
{
|
61
|
48
|
title: '活动标题',
|
62
|
|
- dataIndex: 'img',
|
63
|
|
- key: 'img',
|
|
49
|
+ dataIndex: 'title',
|
|
50
|
+ key: 'title',
|
64
|
51
|
align: 'center',
|
65
|
|
- render: (text, record) => <img src={record.img} className={styles.touxiang} />,
|
66
|
52
|
},
|
67
|
53
|
{
|
68
|
54
|
title: '活动时间',
|
69
|
55
|
dataIndex: 'name',
|
70
|
56
|
key: 'name',
|
71
|
57
|
align: 'center',
|
72
|
|
-
|
73
|
58
|
},
|
74
|
59
|
{
|
75
|
60
|
title: '已参加人数',
|
|
@@ -137,7 +122,7 @@ const header = (props) => {
|
137
|
122
|
console.log(data)
|
138
|
123
|
setData(data)
|
139
|
124
|
})
|
140
|
|
- })
|
|
125
|
+ },[])
|
141
|
126
|
|
142
|
127
|
const getList = (e) => {
|
143
|
128
|
request({
|
|
@@ -198,7 +183,7 @@ const header = (props) => {
|
198
|
183
|
</Form.Item>
|
199
|
184
|
</Form>
|
200
|
185
|
<Button type="primary" className={styles.addBtn} onClick={toEditGoods}>新增</Button>
|
201
|
|
- <Table dataSource={data.records} columns={columns} />
|
|
186
|
+ <Table dataSource={data.list} columns={columns} />
|
202
|
187
|
{/* 分页 */
|
203
|
188
|
/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|
204
|
189
|
<Pagination showQuickJumper defaultCurrent={1} total={500} onChange={onChange} />
|