傅行帆 5 years ago
parent
commit
5d8c170c8c
1 changed files with 4 additions and 19 deletions
  1. 4
    19
      src/pages/activity/ActivityList.jsx

+ 4
- 19
src/pages/activity/ActivityList.jsx View File

43
  * @returns
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
 const columns = [
46
 const columns = [
60
   {
47
   {
61
     title: '活动标题',
48
     title: '活动标题',
62
-    dataIndex: 'img',
63
-    key: 'img',
49
+    dataIndex: 'title',
50
+    key: 'title',
64
     align: 'center',
51
     align: 'center',
65
-    render: (text, record) => <img src={record.img} className={styles.touxiang} />,
66
   },
52
   },
67
   {
53
   {
68
     title: '活动时间',
54
     title: '活动时间',
69
     dataIndex: 'name',
55
     dataIndex: 'name',
70
     key: 'name',
56
     key: 'name',
71
     align: 'center',
57
     align: 'center',
72
-
73
   },
58
   },
74
   {
59
   {
75
     title: '已参加人数',
60
     title: '已参加人数',
137
         console.log(data)
122
         console.log(data)
138
         setData(data)
123
         setData(data)
139
     })
124
     })
140
-  })
125
+  },[])
141
 
126
 
142
   const getList = (e) => {
127
   const getList = (e) => {
143
     request({
128
     request({
198
         </Form.Item>
183
         </Form.Item>
199
       </Form>
184
       </Form>
200
       <Button type="primary" className={styles.addBtn} onClick={toEditGoods}>新增</Button>
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
       /* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
188
       /* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
204
         <Pagination showQuickJumper defaultCurrent={1} total={500} onChange={onChange} />
189
         <Pagination showQuickJumper defaultCurrent={1} total={500} onChange={onChange} />