Kaynağa Gözat

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

weiximei 5 yıl önce
ebeveyn
işleme
e4451830fb

+ 144
- 32
src/components/Cards/PosterCard.jsx Dosyayı Görüntüle

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Card, Checkbox } from 'antd';
2
+import { Card, Checkbox, Button } from 'antd';
3 3
 import apis from '../../services/apis';
4 4
 import request from '../../utils/request'
5 5
 
@@ -13,47 +13,159 @@ const { Meta } = Card;
13 13
  */
14 14
 const PosterCard = (props) => {
15 15
   const [ data, setData ] = useState([])
16
-//   const [ checkedData, setCheckedData ] = useState([])
17 16
 
18
-  useEffect(() => {
19
-    getCardsList(props.postType);    
17
+  useEffect(() => {  
20 18
   },[])
21 19
 
22
-
23
-  const getCardsList = (postType) => {
24
-    request({ ...apis.poster.posterTemplate, params: { type: postType }}).then((data) => {
25
-        setData(data)
26
-      }).catch((err) => {
27
-        message.info(err.msg || err.message)
28
-      })
29
-  }
20
+ 
30 21
 
31 22
   const onChange = (template) => (e) => {
32
-    // debugger
33
-
34
-    if (e.target.checked) {
35
-        if (props.checkedList.indexOf(template.templateId) > -1) {
36
-            props.onChange(props.checkedList)
37
-        } else {
38
-            props.onChange(props.checkedList.concat(template.templateId))
39
-        }
40
-    } else {
41
-        props.onChange(props.checkedList.filter(x => x !== template.templateId))
42
-    }
43 23
   }
44 24
 
45 25
   return (
46
-      data.map(template => (
47
-        <Card
48
-            hoverable
49
-            style={{ width: 240 }}
50
-            cover={<img src={template.img} />}
51
-        >
26
+    <div>
27
+
28
+    <div style={{ display: 'flex' }}>
29
+      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
30
+        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
31
+          <img style={{ width: '100%', height: '300px' }} alt="" />
32
+          <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
33
+            <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} alt="" />
34
+            <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
35
+            <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
36
+            <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
37
+          </div>
38
+          <p style={{
39
+            margin: '10px 20px',
40
+            fontSize: '20px',
41
+            color: '#222',
42
+            fontWeight: '600',
43
+            display: '-webkit-box',
44
+            lineClamp: '3',
45
+            height: '60px',
46
+            WebkitLineClamp: '2',
47
+            WebkitBoxOrient: 'vertical',
48
+            overflow: 'hidden',
49
+            textOverflow: 'ellipsis'
50
+          }}>海报标题</p>
51
+
52
+          <img style={{ width: '30px', marginLeft: '20px' }} alt="" />
53
+          <p style={{
54
+            margin: '16px 20px 28px 20px',
55
+            fontSize: '17px',
56
+            color: '#999',
57
+            display: '-webkit-box',
58
+            lineClamp: '3',
59
+            height: '72px',
60
+            WebkitLineClamp: '3',
61
+            WebkitBoxOrient: 'vertical',
62
+            overflow: 'hidden',
63
+            textOverflow: 'ellipsis'
64
+          }}>海报描述</p>
65
+          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
66
+            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
67
+            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
68
+            <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} alt="" />
69
+          </div>
70
+        </div>
71
+        <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
72
+      </div>
73
+    </div>
74
+
75
+    <div style={{ display: 'flex' }}>
76
+      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
77
+        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
78
+          <img style={{ width: '100%', height: '300px' }} alt="" />
79
+          <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
80
+            <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} alt="" />
81
+            <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
82
+            <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
83
+            <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
84
+          </div>
85
+          <p style={{
86
+            margin: '10px 20px',
87
+            fontSize: '20px',
88
+            color: '#222',
89
+            fontWeight: '600',
90
+            display: '-webkit-box',
91
+            lineClamp: '3',
92
+            height: '60px',
93
+            WebkitLineClamp: '2',
94
+            WebkitBoxOrient: 'vertical',
95
+            overflow: 'hidden',
96
+            textOverflow: 'ellipsis'
97
+          }}>海报标题</p>
52 98
 
53
-        <Checkbox checked={props.checkedList.indexOf(template.templateId) !== -1} onChange={onChange(template)}>生成海分享给朋友</Checkbox>
99
+          <img style={{ width: '30px', marginLeft: '20px' }} alt="" />
100
+          <p style={{
101
+            margin: '16px 20px 28px 20px',
102
+            fontSize: '17px',
103
+            color: '#999',
104
+            display: '-webkit-box',
105
+            lineClamp: '3',
106
+            height: '72px',
107
+            WebkitLineClamp: '3',
108
+            WebkitBoxOrient: 'vertical',
109
+            overflow: 'hidden',
110
+            textOverflow: 'ellipsis'
111
+          }}>海报描述</p>
112
+          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
113
+            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
114
+            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
115
+            <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} alt="" />
116
+          </div>
117
+        </div>
118
+        <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
119
+      </div>
120
+    </div>
121
+    
122
+    <div style={{ display: 'flex' }}>
123
+      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
124
+        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
125
+          <img style={{ width: '100%', height: '300px' }} alt="" />
126
+          <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
127
+            <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} alt="" />
128
+            <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
129
+            <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
130
+            <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
131
+          </div>
132
+          <p style={{
133
+            margin: '10px 20px',
134
+            fontSize: '20px',
135
+            color: '#222',
136
+            fontWeight: '600',
137
+            display: '-webkit-box',
138
+            lineClamp: '3',
139
+            height: '60px',
140
+            WebkitLineClamp: '2',
141
+            WebkitBoxOrient: 'vertical',
142
+            overflow: 'hidden',
143
+            textOverflow: 'ellipsis'
144
+          }}>海报标题</p>
54 145
 
55
-        </Card>
56
-      ))
146
+          <img style={{ width: '30px', marginLeft: '20px' }} alt="" />
147
+          <p style={{
148
+            margin: '16px 20px 28px 20px',
149
+            fontSize: '17px',
150
+            color: '#999',
151
+            display: '-webkit-box',
152
+            lineClamp: '3',
153
+            height: '72px',
154
+            WebkitLineClamp: '3',
155
+            WebkitBoxOrient: 'vertical',
156
+            overflow: 'hidden',
157
+            textOverflow: 'ellipsis'
158
+          }}>海报描述</p>
159
+          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
160
+            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
161
+            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
162
+            <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} alt="" />
163
+          </div>
164
+        </div>
165
+        <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
166
+      </div>
167
+    </div>
168
+  </div>
57 169
   )
58 170
 }
59 171
 export default PosterCard

+ 3
- 1
src/pages/activity/editActivity.jsx Dosyayı Görüntüle

@@ -15,7 +15,8 @@ import logo from '../../assets/logo.png';
15 15
 import touxiang from '../../assets/touxiang.jpg';
16 16
 import poster1 from '../../assets/poster1.png';
17 17
 import poster2 from '../../assets/poster2.png';
18
-import xiaochengxu from '../../assets/xiaochengxu.png'
18
+import xiaochengxu from '../../assets/xiaochengxu.png';
19
+import PosterCard from '../../components/Cards/PosterCard';
19 20
 
20 21
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
21 22
 const { TextArea } = Input;
@@ -306,6 +307,7 @@ const Edit = props => {
306 307
     }
307 308
 
308 309
     return <div>
310
+      <PosterCard/>
309 311
       <div style={{ display: 'flex' }}>
310 312
         <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
311 313
           <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>