xujing 5 years ago
parent
commit
26ef2650fc

+ 40
- 16
config/routes.js View File

268
                 component: './activity/ActivityList',
268
                 component: './activity/ActivityList',
269
               },
269
               },
270
               {
270
               {
271
-                path: '/activity/editActivity', 
271
+                path: '/activity/editActivity',
272
                 name: '编辑活动',
272
                 name: '编辑活动',
273
                 hideInMenu: true,
273
                 hideInMenu: true,
274
                 component: './activity/editActivity',
274
                 component: './activity/editActivity',
285
                 hideInMenu: true,
285
                 hideInMenu: true,
286
                 component: './activity/SignList',
286
                 component: './activity/SignList',
287
               },
287
               },
288
-              {     
288
+              {
289
                 path: '/activity/activityRecord',
289
                 path: '/activity/activityRecord',
290
                 name: '数据记录',
290
                 name: '数据记录',
291
                 hideInMenu: true,
291
                 hideInMenu: true,
292
                 component: './activity/activityRecord',
292
                 component: './activity/activityRecord',
293
-            },
293
+              },
294
               {
294
               {
295
                 path: '/activity/helpActivity/list',
295
                 path: '/activity/helpActivity/list',
296
                 name: '助力活动',
296
                 name: '助力活动',
314
                 hideInMenu: true,
314
                 hideInMenu: true,
315
                 component: './activity/helpActivity/signList',
315
                 component: './activity/helpActivity/signList',
316
               },
316
               },
317
-              {     
317
+              {
318
                 path: '/activity/helpActivity/helpActivityRecord',
318
                 path: '/activity/helpActivity/helpActivityRecord',
319
                 name: '数据记录',
319
                 name: '数据记录',
320
                 hideInMenu: true,
320
                 hideInMenu: true,
321
                 component: './activity/helpActivity/helpActivityRecord',
321
                 component: './activity/helpActivity/helpActivityRecord',
322
-            },
322
+              },
323
               {
323
               {
324
                 path: '/activity/groupActivity/list',
324
                 path: '/activity/groupActivity/list',
325
                 name: '拼团活动',
325
                 name: '拼团活动',
343
                 hideInMenu: true,
343
                 hideInMenu: true,
344
                 component: './activity/groupActivity/detailActivity',
344
                 component: './activity/groupActivity/detailActivity',
345
               },
345
               },
346
-              {     
346
+              {
347
                 path: '/activity/groupActivity/groupActivityRecord',
347
                 path: '/activity/groupActivity/groupActivityRecord',
348
                 name: '数据记录',
348
                 name: '数据记录',
349
                 hideInMenu: true,
349
                 hideInMenu: true,
350
                 component: './activity/groupActivity/groupActivityRecord',
350
                 component: './activity/groupActivity/groupActivityRecord',
351
-            },
351
+              },
352
               {
352
               {
353
                 path: '/activity/drainage/DrainageList',
353
                 path: '/activity/drainage/DrainageList',
354
                 name: 'H5活动',
354
                 name: 'H5活动',
378
                 hideInMenu: true,
378
                 hideInMenu: true,
379
                 component: './activity/helpActivity/detailActivity',
379
                 component: './activity/helpActivity/detailActivity',
380
               },
380
               },
381
-              {     
381
+              {
382
                 path: '/activity/drainage/drainageRecord',
382
                 path: '/activity/drainage/drainageRecord',
383
                 name: '数据记录',
383
                 name: '数据记录',
384
                 hideInMenu: true,
384
                 hideInMenu: true,
385
                 component: './activity/drainage/drainageRecord',
385
                 component: './activity/drainage/drainageRecord',
386
-            },
386
+              },
387
               {
387
               {
388
                 path: '/activity/liveActivity/list/index',
388
                 path: '/activity/liveActivity/list/index',
389
                 name: '直播活动',
389
                 name: '直播活动',
401
                 hideInMenu: true,
401
                 hideInMenu: true,
402
                 component: './activity/liveActivity/edit',
402
                 component: './activity/liveActivity/edit',
403
               },
403
               },
404
-              {     
404
+              {
405
                 path: '/activity/liveActivity/liveActivityRecord',
405
                 path: '/activity/liveActivity/liveActivityRecord',
406
                 name: '数据记录',
406
                 name: '数据记录',
407
                 hideInMenu: true,
407
                 hideInMenu: true,
408
                 component: './activity/liveActivity/list/liveActivityRecord',
408
                 component: './activity/liveActivity/list/liveActivityRecord',
409
-            },
409
+              },
410
             ],
410
             ],
411
           },
411
           },
412
           {
412
           {
933
                 name: '二维码列表',
933
                 name: '二维码列表',
934
                 component: './qrcode/qrcodelist/index',
934
                 component: './qrcode/qrcodelist/index',
935
               },
935
               },
936
-           
936
+
937
               {
937
               {
938
                 path: '/qrcode/qrcodelist/add',
938
                 path: '/qrcode/qrcodelist/add',
939
                 name: '新增',
939
                 name: '新增',
940
                 hideInMenu: true,
940
                 hideInMenu: true,
941
                 component: './qrcode/qrcodelist/add',
941
                 component: './qrcode/qrcodelist/add',
942
-              },   
942
+              },
943
               {
943
               {
944
                 path: '/qrcode/qrcodelist/dataRecord',
944
                 path: '/qrcode/qrcodelist/dataRecord',
945
                 name: '数据记录',
945
                 name: '数据记录',
946
                 hideInMenu: true,
946
                 hideInMenu: true,
947
                 component: './qrcode/qrcodelist/dataRecord',
947
                 component: './qrcode/qrcodelist/dataRecord',
948
-              },   
948
+              },
949
             ],
949
             ],
950
           },
950
           },
951
           {
951
           {
958
                 name: '账户资金',
958
                 name: '账户资金',
959
                 component: './funds/accountfunds/index',
959
                 component: './funds/accountfunds/index',
960
               },
960
               },
961
-           
961
+
962
               // {
962
               // {
963
               //   path: '/fund/qrcodelist/add',
963
               //   path: '/fund/qrcodelist/add',
964
               //   name: '新增',
964
               //   name: '新增',
969
                 path: '/funds/financialContact',
969
                 path: '/funds/financialContact',
970
                 name: '财务联系人',
970
                 name: '财务联系人',
971
                 component: './funds/financialContact/index',
971
                 component: './funds/financialContact/index',
972
-              },   
972
+              },
973
+            ],
974
+          },
975
+          {
976
+            path: '/marketingTools',
977
+            name: '营销工具',
978
+            component: '../layouts/BlankLayout',
979
+            routes: [
980
+              {
981
+                path: '/marketingTools/index',
982
+                name: '营销列表',
983
+                component: './marketingTools/index',
984
+              },
985
+              {
986
+                path: '/marketingTools/lottery/index',
987
+                name: '幸运大抽奖',
988
+                hideInMenu: true,
989
+                component: './marketingTools/lottery/index',
990
+              },
991
+              {
992
+                path: '/marketingTools/lottery/data',
993
+                name: '数据',
994
+                hideInMenu: true,
995
+                component: './marketingTools/lottery/data',
996
+              },
973
             ],
997
             ],
974
           },
998
           },
975
           // {
999
           // {

+ 60
- 0
src/pages/marketingTools/index.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Row, Col } from 'antd';
3
+import router from 'umi/router';
4
+import Styles from './style.less';
5
+
6
+
7
+const market = props => {
8
+
9
+    const list = [
10
+        {
11
+            img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591876471373&di=ceb7710067a87ee0fb182c4e7e753c04&imgtype=0&src=http%3A%2F%2Fa3.att.hudong.com%2F14%2F75%2F01300000164186121366756803686.jpg',
12
+            title: '幸运大抽奖',
13
+            desc: '常见的转盘式抽奖方法',
14
+            url: '/marketingTools/lottery/index'
15
+        },
16
+        {
17
+            img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591876471373&di=ceb7710067a87ee0fb182c4e7e753c04&imgtype=0&src=http%3A%2F%2Fa3.att.hudong.com%2F14%2F75%2F01300000164186121366756803686.jpg',
18
+            title: '秒杀',
19
+            desc: '快速抢购引导顾客更多消费'
20
+        },
21
+        {
22
+            img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591876471373&di=ceb7710067a87ee0fb182c4e7e753c04&imgtype=0&src=http%3A%2F%2Fa3.att.hudong.com%2F14%2F75%2F01300000164186121366756803686.jpg',
23
+            title: '刮刮卡',
24
+            desc: '通过刮开卡片的方式进行抽奖的玩法'
25
+        },
26
+        {
27
+            img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591876471373&di=ceb7710067a87ee0fb182c4e7e753c04&imgtype=0&src=http%3A%2F%2Fa3.att.hudong.com%2F14%2F75%2F01300000164186121366756803686.jpg',
28
+            title: '趣味测试',
29
+            desc: '趣味小测试,互动吸粉'
30
+        },
31
+    ]
32
+
33
+    const handleItem = (url) => {
34
+
35
+        router.push({
36
+            pathname: url,
37
+        });
38
+    }
39
+
40
+    return <>
41
+        <p>营销工具:抓取客户,社交裂变</p>
42
+
43
+        <div className={Styles.flex}>
44
+            {
45
+                list.map((item, _) => (
46
+                    <div className={Styles.itemBox} onClick={() => handleItem(item.url)}>
47
+                        <img className={Styles.img} src={item.img} ></img>
48
+                        <div>
49
+                            <p style={{ fontSize: '18px' }}>{item.title}</p>
50
+                            <p style={{ fontSize: '15px', color: '#999', marginBottom: '0px' }}>{item.desc}</p>
51
+                        </div>
52
+                    </div>
53
+                ))
54
+            }
55
+
56
+        </div>
57
+    </>
58
+}
59
+
60
+export default market

+ 190
- 0
src/pages/marketingTools/lottery/data.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, Pagination, Tabs, Radio, Table } from 'antd';
3
+
4
+function Data(props) {
5
+
6
+    const [tab, setTab] = useState('base')
7
+
8
+    const list = [
9
+        {
10
+            name: '曹建芳',
11
+            phone: '1751260225',
12
+            award: '华为P30pro',
13
+            date: '2020-06-05 17:31:00',
14
+            times: '2',
15
+            shareName: '',
16
+            sharePhone: '',
17
+            shareDate: '',
18
+            index: '1',
19
+        },
20
+        {
21
+            name: '小太阳',
22
+            phone: '15150594584',
23
+            award: '500元苏果卡',
24
+            date: '2020-06-04 09:27:42',
25
+            times: '3',
26
+            shareName: '小铲子',
27
+            sharePhone: '18752471793',
28
+            shareDate: '2020-06-04 09:26:58',
29
+            index: '2',
30
+        },
31
+        {
32
+            name: '小五子',
33
+            phone: '17625959403',
34
+            award: '500元苏果卡',
35
+            date: '2020-06-03 18:21:56',
36
+            times: '5',
37
+            shareName: '',
38
+            sharePhone: '',
39
+            shareDate: '',
40
+            index: '3',
41
+        },
42
+    ]
43
+
44
+
45
+    const columns = [
46
+        {
47
+            title: '姓名',
48
+            dataIndex: 'name',
49
+            key: 'name',
50
+            align: 'center',
51
+        },
52
+        {
53
+            title: '电话',
54
+            dataIndex: 'phone',
55
+            key: 'phone',
56
+            align: 'center',
57
+        },
58
+        {
59
+            title: '抽中奖品',
60
+            dataIndex: 'award',
61
+            key: 'award',
62
+            align: 'center',
63
+        },
64
+        {
65
+            title: '中奖时间',
66
+            dataIndex: 'date',
67
+            key: 'date',
68
+            align: 'center',
69
+        },
70
+    ];
71
+
72
+    const columns2 = [
73
+        {
74
+            title: '姓名',
75
+            dataIndex: 'name',
76
+            key: 'name',
77
+            align: 'center',
78
+        },
79
+        {
80
+            title: '电话',
81
+            dataIndex: 'phone',
82
+            key: 'phone',
83
+            align: 'center',
84
+        },
85
+        {
86
+            title: '最后抽奖时间',
87
+            dataIndex: 'date',
88
+            key: 'date',
89
+            align: 'center',
90
+        },
91
+        {
92
+            title: '抽奖次数',
93
+            dataIndex: 'times',
94
+            key: 'times',
95
+            align: 'center',
96
+        },
97
+    ];
98
+
99
+    const columns3 = [
100
+        {
101
+            title: '分享人',
102
+            dataIndex: 'name',
103
+            key: 'name',
104
+            align: 'center',
105
+        },
106
+        {
107
+            title: '分享人电话',
108
+            dataIndex: 'phone',
109
+            key: 'phone',
110
+            align: 'center',
111
+        },
112
+        {
113
+            title: '分享时间',
114
+            dataIndex: 'date',
115
+            key: 'date',
116
+            align: 'center',
117
+        },
118
+    ];
119
+    const columns4 = [
120
+        {
121
+            title: '访问者',
122
+            dataIndex: 'name',
123
+            key: 'name',
124
+            align: 'center',
125
+        },
126
+        {
127
+            title: '访问者电话',
128
+            dataIndex: 'phone',
129
+            key: 'phone',
130
+            align: 'center',
131
+        },
132
+        {
133
+            title: '访问时间',
134
+            dataIndex: 'date',
135
+            key: 'date',
136
+            align: 'center',
137
+        },
138
+        {
139
+            title: '分享者',
140
+            dataIndex: 'shareName',
141
+            key: 'shareName',
142
+            align: 'center',
143
+        },
144
+        {
145
+            title: '分享者电话',
146
+            dataIndex: 'sharePhone',
147
+            key: 'sharePhone',
148
+            align: 'center',
149
+        },
150
+        {
151
+            title: '分享时间',
152
+            dataIndex: 'shareDate',
153
+            key: 'shareDate',
154
+            align: 'center',
155
+        },
156
+
157
+    ];
158
+    return (
159
+        <>
160
+            <Radio.Group value={tab} buttonStyle="solid" onChange={e => setTab(e.target.value)}>
161
+                <Radio.Button value="base">中奖人数</Radio.Button>
162
+                <Radio.Button value="apartment">抽奖人数</Radio.Button>
163
+                <Radio.Button value="image">分享记录</Radio.Button>
164
+                <Radio.Button value="panorama">访问记录</Radio.Button>
165
+
166
+            </Radio.Group>
167
+            <div style={{ marginTop: '20px' }}>
168
+                {tab === 'base' && <>
169
+                    <Table dataSource={list} columns={columns} pagination={false} rowKey={(x => x.index)} />
170
+                </>}
171
+                {tab === 'apartment' && <>
172
+                    <Table dataSource={list} columns={columns2} pagination={false} rowKey={(x => x.index)} />
173
+                </>}
174
+                {tab === 'image' && <>
175
+                    <Table dataSource={list} columns={columns3} pagination={false} rowKey={(x => x.index)} />
176
+                </>}
177
+                {tab === 'panorama' && <>
178
+                    <Table dataSource={list} columns={columns4} pagination={false} rowKey={(x => x.index)} />
179
+                </>}
180
+                <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
181
+                    <Pagination showQuickJumper defaultCurrent={1} total={10} onChange={e => changePageNum(e, props)} current={1} />
182
+                </div>
183
+            </div>
184
+        </>
185
+    )
186
+}
187
+
188
+const WrappedDataForm = Form.create({ name: 'Data' })(Data);
189
+
190
+export default WrappedDataForm

+ 179
- 0
src/pages/marketingTools/lottery/index.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Button, Select, Icon, message, Table, Pagination, Input, Modal } from 'antd';
3
+import router from 'umi/router';
4
+
5
+const { Option } = Select;
6
+
7
+const lottery = (props) => {
8
+
9
+    const [visible, setVisible] = useState(false)
10
+
11
+    const list = [
12
+        {
13
+            title: '618幸运大抽奖',
14
+            date: '2020-06-18 00:00:00~2020-06-20 00:00:00',
15
+            status: '未开始',
16
+            times: '1300',
17
+            personNum: '687',
18
+            personNum2: '350',
19
+            index: '1',
20
+        },
21
+        {
22
+            title: '儿童节感恩回馈抽奖活动',
23
+            date: '2020-06-1 00:00:00~2020-06-5 00:00:00',
24
+            status: '已结束',
25
+            times: '800',
26
+            personNum: '2487',
27
+            personNum2: '500',
28
+            index: '2',
29
+        },
30
+        {
31
+            title: '情人节抽奖活动',
32
+            date: '2020-02-14 00:00:00~2020-02-14 00:01:00',
33
+            status: '已结束',
34
+            times: '1500',
35
+            personNum: '1242',
36
+            personNum2: '288',
37
+            index: '3',
38
+        },
39
+
40
+    ]
41
+    const toData = ()=>{
42
+          router.push({
43
+            pathname: '/marketingTools/lottery/data',
44
+        });
45
+    }
46
+
47
+    const columns = [
48
+
49
+
50
+        {
51
+            title: '活动名称',
52
+            dataIndex: 'title',
53
+            key: 'title',
54
+            align: 'center',
55
+            render: (title) => <span style={{ color: '#1D74D9' }}>{title}</span>
56
+        },
57
+        {
58
+            title: '活动时间',
59
+            dataIndex: 'date',
60
+            key: 'date',
61
+            align: 'center',
62
+        },
63
+        {
64
+            title: '活动状态',
65
+            dataIndex: 'status',
66
+            key: 'status',
67
+            align: 'center',
68
+        },
69
+        {
70
+            title: '抽奖次数',
71
+            dataIndex: 'times',
72
+            key: 'times',
73
+            align: 'center',
74
+        },
75
+        {
76
+            title: '抽奖人数',
77
+            dataIndex: 'personNum',
78
+            key: 'personNum',
79
+            align: 'center',
80
+        },
81
+        {
82
+            title: '中奖人数',
83
+            dataIndex: 'personNum2',
84
+            key: 'personNum2',
85
+            align: 'center',
86
+        },
87
+        {
88
+            title: '操作',
89
+            dataIndex: 'handle',
90
+            key: 'handle',
91
+            align: 'center',
92
+            render: () => <>
93
+                <span style={{ color: '#FF4A4A', marginRight: '6px', cursor: 'pointer' }} onClick={() => toData()}>数据</span>
94
+                <span style={{ color: '#FF4A4A', marginRight: '6px', cursor: 'pointer' }} onClick={() => setVisible(true)}>推广</span>
95
+                <span style={{ color: '#FF4A4A', marginRight: '6px' }}>编辑</span>
96
+                <span style={{ color: '#FF4A4A' }}>删除</span>
97
+            </>
98
+        },
99
+    ];
100
+
101
+
102
+    const changePageNum = (pageNumber, props) => {
103
+
104
+    }
105
+
106
+    // 提交事件
107
+    const handleSubmit = (e, props) => {
108
+
109
+    }
110
+
111
+    const toEdit = () => {
112
+
113
+    }
114
+
115
+    //重置搜索
116
+    function handleReset() {
117
+
118
+    }
119
+
120
+
121
+
122
+    const { getFieldDecorator } = props.form
123
+    return (
124
+
125
+        <>
126
+            <Modal
127
+                visible={visible}
128
+                title="推广二维码与推广链接"
129
+                // onOk={this.handleOk}
130
+                onCancel={() => setVisible(false)}
131
+                footer={null}
132
+            >
133
+                <div style={{ textAlign: 'center' }}>
134
+                    <img style={{ width: '200px', height: '200px' }} src='https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3602624501,870193918&fm=26&gp=0.jpg' ></img>
135
+                    <p>https://dev.fangdeal.cn/admin/#/activity/drainage/DrainageList <span style={{ color: '#1D74D9' }}>复制链接</span></p>
136
+                </div>
137
+            </Modal>
138
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
139
+                <Form.Item>
140
+                    {getFieldDecorator('targetName')(
141
+                        <Input
142
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
143
+                            placeholder="活动名称"
144
+                        />,
145
+                    )}
146
+                </Form.Item>
147
+
148
+                <Form.Item>
149
+                    {getFieldDecorator('status')(
150
+                        <Select style={{ width: '180px' }} placeholder="状态">
151
+                            <Option value="0">全部</Option>
152
+                            <Option value="1">未开始</Option>
153
+                            <Option value="2">进行中</Option>
154
+                            <Option value="3">已结束</Option>
155
+                        </Select>,
156
+                    )}
157
+                </Form.Item>
158
+                <Form.Item>
159
+                    <Button type="primary" htmlType="submit">
160
+                        搜索
161
+                     </Button>
162
+                    <Button style={{ marginLeft: 8 }} onClick={handleReset}>
163
+                        重置
164
+            </Button>
165
+                </Form.Item>
166
+            </Form>
167
+
168
+            <Button type="danger" style={{ margin: '10px 0 12px 0' }} onClick={() => toEdit()}>新增</Button>
169
+
170
+            <Table dataSource={list} columns={columns} pagination={false} rowKey={(x => x.index)} />
171
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
172
+                <Pagination showQuickJumper defaultCurrent={1} total={1} onChange={e => changePageNum(e, props)} current={1} />
173
+            </div>
174
+        </>
175
+    )
176
+}
177
+const WrappedHeader = Form.create({ name: 'lottery' })(lottery);
178
+
179
+export default WrappedHeader

+ 0
- 0
src/pages/marketingTools/lottery/style.less View File


+ 26
- 0
src/pages/marketingTools/style.less View File

1
+.flex{
2
+ 
3
+    display: flex;
4
+    flex-wrap: wrap;
5
+    align-content: flex-start;
6
+    justify-content: space-between;
7
+       
8
+}
9
+.itemBox{
10
+    flex: 0 0 30%;
11
+    height: 120px;
12
+    box-sizing: border-box;
13
+    border-radius: 4px;
14
+    border:1px solid #eee;
15
+    padding: 10px;
16
+    margin-bottom: 30px;
17
+    display: flex;
18
+    align-items: center;
19
+    min-width: 300px;
20
+
21
+    .img{
22
+        height: 100px;
23
+        width: 100px;
24
+        margin-right: 16px;
25
+    }
26
+}