xujing 5 years ago
parent
commit
b769aa47cb

BIN
src/assets/choujiang1.png View File


BIN
src/assets/choujiang2.png View File


BIN
src/assets/lotteryTop.png View File


+ 13
- 17
src/pages/marketingTools/components/step1.jsx View File

10
     const formItemLayout = {
10
     const formItemLayout = {
11
         labelCol: {
11
         labelCol: {
12
             xs: { span: 24 },
12
             xs: { span: 24 },
13
-            sm: { span: 5 },
13
+            sm: { span: 4 },
14
         },
14
         },
15
         wrapperCol: {
15
         wrapperCol: {
16
             xs: { span: 24 },
16
             xs: { span: 24 },
17
-            sm: { span: 16 },
17
+            sm: { span: 19 },
18
         },
18
         },
19
     };
19
     };
20
 
20
 
30
 
30
 
31
     return (
31
     return (
32
         <>
32
         <>
33
-            <Form {...formItemLayout} onSubmit={handleSubmit}>
33
+            <Form {...formItemLayout} style={{ minWidth: '600px' }} onSubmit={handleSubmit}>
34
                 <p className={Styles.title}>基本信息</p>
34
                 <p className={Styles.title}>基本信息</p>
35
                 <Form.Item label="活动名称" >
35
                 <Form.Item label="活动名称" >
36
                     {getFieldDecorator('activityName', {
36
                     {getFieldDecorator('activityName', {
65
                     })(
65
                     })(
66
                         <Radio.Group>
66
                         <Radio.Group>
67
                             <Radio value={1}>无线抽奖</Radio>
67
                             <Radio value={1}>无线抽奖</Radio>
68
-                            <Radio value={2}>积分抽奖,消耗 {getFieldDecorator('integral')(<InputNumber min={1} />)} 积分</Radio>
68
+                            <Radio value={2}>积分抽奖,消耗 {getFieldDecorator('integral')(<InputNumber size="small" min={1} />)} 积分</Radio>
69
                         </Radio.Group>,
69
                         </Radio.Group>,
70
                     )}
70
                     )}
71
                 </Form.Item>
71
                 </Form.Item>
77
                         <Radio.Group>
77
                         <Radio.Group>
78
                             <Radio value={1}>
78
                             <Radio value={1}>
79
                                 一天N次
79
                                 一天N次
80
-                                <div style={{ marginTop: '8px' }}>每人每天抽 {getFieldDecorator('times1')(<InputNumber min={1} />)} 次</div>
81
-                                <div>每天分享额外抽 {getFieldDecorator('times2')(<InputNumber min={1} />)} 次</div>
80
+                                <div style={{ margin: '10px 0' }}>每人每天抽 {getFieldDecorator('times1')(<InputNumber size="small" min={1} />)} 次</div>
81
+                                <div style={{width:'400px'}}>每天分享额外抽 {getFieldDecorator('times2')(<InputNumber size="small" min={1} />)} 次</div>
82
                             </Radio>
82
                             </Radio>
83
                             <Radio value={2}>
83
                             <Radio value={2}>
84
                                 一人N次
84
                                 一人N次
85
-                                        <div style={{ marginTop: '8px' }}>每人一共可抽 {getFieldDecorator('times3')(<InputNumber min={1} />)} 次</div>
86
-                                <div>每人分享额外抽 {getFieldDecorator('times4')(<InputNumber min={1} />)} 次</div>
85
+                                <div style={{ margin: '10px 0' }}>每人一共可抽 {getFieldDecorator('times3')(<InputNumber size="small" min={1} />)} 次</div>
86
+                                <div>每人分享额外抽 {getFieldDecorator('times4')(<InputNumber size="small" min={1} />)} 次</div>
87
                             </Radio>
87
                             </Radio>
88
                         </Radio.Group>,
88
                         </Radio.Group>,
89
                     )}
89
                     )}
90
                 </Form.Item>
90
                 </Form.Item>
91
-
92
-
93
-
94
-                <Form.Item style={{ width: '500px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
95
-                    <Button onClick={() => router.go(-1)} style={{ margin: '0 20px' }}>
96
-                        取消
97
-                    </Button>
98
-
99
-                    <Button type="primary" htmlType="submit">
91
+                <Form.Item style={{ width: '400px', position: 'absolute', bottom: '70px', left: '600px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
92
+                    <Button type="primary" htmlType="submit" style={{ margin: '0 40px' }}>
100
                         下一步
93
                         下一步
101
                     </Button>
94
                     </Button>
95
+                    <Button onClick={() => router.go(-1)}>
96
+                        取消
97
+                    </Button>
102
                 </Form.Item>
98
                 </Form.Item>
103
             </Form>
99
             </Form>
104
         </>
100
         </>

+ 12
- 11
src/pages/marketingTools/components/step2.jsx View File

8
     const formItemLayout = {
8
     const formItemLayout = {
9
         labelCol: {
9
         labelCol: {
10
             xs: { span: 24 },
10
             xs: { span: 24 },
11
-            sm: { span: 5 },
11
+            sm: { span: 4 },
12
         },
12
         },
13
         wrapperCol: {
13
         wrapperCol: {
14
             xs: { span: 24 },
14
             xs: { span: 24 },
15
-            sm: { span: 16 },
15
+            sm: { span: 19 },
16
         },
16
         },
17
     };
17
     };
18
     const list = [
18
     const list = [
119
     return (
119
     return (
120
         <>
120
         <>
121
             <Form {...formItemLayout} onSubmit={handleSubmit}>
121
             <Form {...formItemLayout} onSubmit={handleSubmit}>
122
-                <p className={Styles.title}>奖品设置</p>
123
-                <p className={Styles.blue}>添加奖品</p>
124
-                <Table className={Styles.table} bordered dataSource={list} columns={columns} pagination={false} rowKey={(x => x.index)} />
125
                 <p className={Styles.title} style={{ marginTop: '20px' }}>未中奖设置</p>
122
                 <p className={Styles.title} style={{ marginTop: '20px' }}>未中奖设置</p>
126
                 <Form.Item label="名称" >
123
                 <Form.Item label="名称" >
127
                     {getFieldDecorator('name', {
124
                     {getFieldDecorator('name', {
158
 
155
 
159
                     )}
156
                     )}
160
                 </Form.Item>
157
                 </Form.Item>
161
-
162
-                <Form.Item style={{ width: '500px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
163
-                    <Button onClick={() => props.onPre()} style={{ margin: '0 20px' }}>
164
-                        上一步
165
-                    </Button>
166
-                    <Button type="primary" htmlType="submit">
158
+                <div >
159
+                    <p className={Styles.title}>奖品设置</p>
160
+                    <p className={Styles.blue}>添加奖品</p>
161
+                    <Table className={Styles.table} bordered dataSource={list} columns={columns} pagination={false} rowKey={(x => x.index)} />
162
+                </div>
163
+                <Form.Item style={{ width: '400px', position: 'absolute', bottom: '70px', left: '600px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
164
+                    <Button type="primary" htmlType="submit" style={{ margin: '0 40px' }}>
167
                         下一步
165
                         下一步
168
                     </Button>
166
                     </Button>
167
+                    <Button onClick={() => props.onPre()} >
168
+                        上一步
169
+                    </Button>
169
                 </Form.Item>
170
                 </Form.Item>
170
             </Form>
171
             </Form>
171
         </>
172
         </>

+ 2
- 4
src/pages/marketingTools/components/style.less View File

1
 .title{
1
 .title{
2
     font-weight: 600;
2
     font-weight: 600;
3
-    border-bottom: 1px solid #eee;
4
-    font-size: 15px;
5
-    padding-bottom: 6px;
6
-    margin-bottom: 20px;
3
+    font-size: 16px;
4
+    margin-bottom: 30px;
7
 }
5
 }
8
 .blue{
6
 .blue{
9
     color: #1D74D9;
7
     color: #1D74D9;

+ 25
- 20
src/pages/marketingTools/index.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Row, Col } from 'antd';
2
+import { Row, Col, message } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import Styles from './style.less';
4
 import Styles from './style.less';
5
+import lotteryTop from '../../assets/lotteryTop.png'
5
 import bargain from '../../assets/market/bargain.png'
6
 import bargain from '../../assets/market/bargain.png'
6
 import card from '../../assets/market/card.png'
7
 import card from '../../assets/market/card.png'
7
 import collage from '../../assets/market/collage.png'
8
 import collage from '../../assets/market/collage.png'
65
     ]
66
     ]
66
 
67
 
67
     const handleItem = (url) => {
68
     const handleItem = (url) => {
68
-
69
-        router.push({
70
-            pathname: url,
71
-        });
69
+        if (url) {
70
+            router.push({
71
+                pathname: url,
72
+            });
73
+        } else {
74
+            message.info('正在积极开发中');
75
+        }
72
     }
76
     }
73
 
77
 
74
     return <>
78
     return <>
75
-        <p>营销工具:抓取客户,社交裂变</p>
79
+        {/* <p>营销工具:抓取客户,社交裂变</p> */}
80
+        <img src={lotteryTop} className={Styles.lotteryTop}></img>
76
 
81
 
77
-            <Row style={{width:'100%'}}>
78
-                {
79
-                    list.map((item, index) => (
80
-                        <Col span={8}>
81
-                            <div key={index} className={Styles.itemBox} onClick={() => handleItem(item.url)}>
82
-                                <img className={Styles.img} src={item.img} ></img>
83
-                                <div>
84
-                                    <p style={{ fontSize: '18px' }}>{item.title}</p>
85
-                                    <p style={{ fontSize: '15px', color: '#999', marginBottom: '0px' }}>{item.desc}</p>
86
-                                </div>
82
+        <Row style={{ width: '100%' }}>
83
+            {
84
+                list.map((item, index) => (
85
+                    <Col span={8}>
86
+                        <div key={index} className={Styles.itemBox} onClick={() => handleItem(item.url)}>
87
+                            <img className={Styles.img} src={item.img} ></img>
88
+                            <div>
89
+                                <p style={{ fontSize: '17px', fontWeight: '600', color: '#333' }}>{item.title}</p>
90
+                                <p style={{ fontSize: '15px', color: '#666', marginBottom: '0px' }}>{item.desc}</p>
87
                             </div>
91
                             </div>
88
-                        </Col>
89
-                    ))
90
-                }
91
-            </Row>
92
+                        </div>
93
+                    </Col>
94
+                ))
95
+            }
96
+        </Row>
92
     </>
97
     </>
93
 }
98
 }
94
 
99
 

+ 8
- 7
src/pages/marketingTools/lottery/add.jsx View File

5
 import Step2 from '../components/step2'
5
 import Step2 from '../components/step2'
6
 import Step3 from '../components/step3'
6
 import Step3 from '../components/step3'
7
 import Step4 from '../components/step4'
7
 import Step4 from '../components/step4'
8
+import lotteryImg from '../../../assets/choujiang1.png'
8
 
9
 
9
 function AddActivity(props) {
10
 function AddActivity(props) {
10
     const { getFieldDecorator } = props.form;
11
     const { getFieldDecorator } = props.form;
11
     const { RangePicker } = DatePicker;
12
     const { RangePicker } = DatePicker;
12
 
13
 
13
-    const [tab, setTab] = useState('0')
14
+    const [tab, setTab] = useState('1')
14
 
15
 
15
 
16
 
16
     const tabTitle = [
17
     const tabTitle = [
21
     ]
22
     ]
22
 
23
 
23
 
24
 
24
-    const img = 'http://123.57.65.31:8081/axure/%E8%90%A5%E9%94%80%E4%BA%91/%e8%90%a5%e9%94%80%e4%ba%91V3.5.30%e6%a9%99%e8%95%89%e6%8e%a8%e5%b9%bf/images/%E6%96%B0%E5%A2%9E%E5%B9%B8%E8%BF%90%E5%A4%A7%E6%8A%BD%E5%A5%96_v3_5_30_/u4584.png'
25
     return (
25
     return (
26
         <>
26
         <>
27
             <div className={Styles.tabBox}>
27
             <div className={Styles.tabBox}>
32
                 }
32
                 }
33
             </div>
33
             </div>
34
             <div className={Styles.content}>
34
             <div className={Styles.content}>
35
-                {tab != '3' && <>
36
-                    <div className={Styles.img}>
37
-                        <img src={img}></img>
38
-                    </div>
39
-                </>}
40
 
35
 
41
                 {tab == '0' && <><Step1 onNext={() => setTab('1')} /></>}
36
                 {tab == '0' && <><Step1 onNext={() => setTab('1')} /></>}
42
                 {tab == '1' && <>
37
                 {tab == '1' && <>
49
                     <Step4 onRefresh={() => setTab('0')} />
44
                     <Step4 onRefresh={() => setTab('0')} />
50
                 </>}
45
                 </>}
51
 
46
 
47
+                {tab != '3' && <>
48
+                    <div className={Styles.img}>
49
+                        <img src={lotteryImg} style={{ width: '300px' }}></img>
50
+                    </div>
51
+                </>}
52
+
52
             </div>
53
             </div>
53
         </>
54
         </>
54
     )
55
     )

+ 10
- 8
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';
1
+import React, { useState } from 'react';
2
+import { Form, Button, Select, Icon, Table, Pagination, Input, Modal } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
+import withActions from '@/components/ActionList';
5
+import EditIcon from '@/components/EditIcon';
4
 
6
 
5
 const { Option } = Select;
7
 const { Option } = Select;
6
 
8
 
94
             dataIndex: 'handle',
96
             dataIndex: 'handle',
95
             key: 'handle',
97
             key: 'handle',
96
             align: 'center',
98
             align: 'center',
97
-            render: () => <>
98
-                <span style={{ color: '#FF4A4A', marginRight: '6px', cursor: 'pointer' }} onClick={() => toData()}>数据</span>
99
-                <span style={{ color: '#FF4A4A', marginRight: '6px', cursor: 'pointer' }} onClick={() => setVisible(true)}>推广</span>
100
-                <span style={{ color: '#FF4A4A', marginRight: '6px' }} onClick={() => toEdit()}>编辑</span>
101
-                <span style={{ color: '#FF4A4A' }}>删除</span>
102
-            </>
99
+            render: withActions((text, record) => [
100
+                <EditIcon color="#FF7E48" type="edit" text="编辑" onClick={() => toEdit()} />,
101
+                <EditIcon color="#FF4A4A" type="publish" text="推广" onClick={() => setVisible(true)} />,
102
+                <EditIcon color="#FF4A4A" type="data" text="数据" onClick={() => toData()} />,
103
+                <EditIcon color="#FF4A4A" type="delete" text="删除" />
104
+            ]),
103
         },
105
         },
104
     ];
106
     ];
105
 
107
 

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

24
 .content{
24
 .content{
25
     display: flex;
25
     display: flex;
26
     padding: 60px 10%;
26
     padding: 60px 10%;
27
+    margin-bottom: 60px;
27
   
28
   
28
 }
29
 }
29
-.title{
30
-    font-weight: 600;
31
-    border-bottom: 1px solid #eee;
32
-    font-size: 15px;
33
-    padding-bottom: 6px;
34
-    margin-bottom: 20px;
35
-}
30
+
36
 .img{
31
 .img{
37
-    margin-right: 80px;
32
+    margin-left: 80px;
33
+    margin-top: 40px;
38
 }
34
 }

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

1
+.lotteryTop{
2
+    padding:  0 15px 15px 15px;
3
+    width: 100%;
4
+    min-width: 1400px;
5
+}
1
 
6
 
2
 .itemBox{
7
 .itemBox{
3
     height: 132px;
8
     height: 132px;