许静 5 лет назад
Родитель
Сommit
2b96531644
1 измененных файлов: 68 добавлений и 58 удалений
  1. 68
    58
      src/components/Cards/PosterCard.jsx

+ 68
- 58
src/components/Cards/PosterCard.jsx Просмотреть файл

@@ -1,8 +1,12 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Card, Checkbox, Button,Upload } from 'antd';
2
+import { Card, Checkbox, Button, Upload } from 'antd';
3 3
 import apis from '../../services/apis';
4 4
 import request from '../../utils/request'
5 5
 import { uploaderProps } from '../../utils/upload';
6
+import head1 from '../../assets/head1.png';
7
+import head2 from '../../assets/head2.png';
8
+import head3 from '../../assets/head3.png';
9
+import link from '../../assets/link.png';
6 10
 
7 11
 const { Meta } = Card;
8 12
 
@@ -13,17 +17,17 @@ const { Meta } = Card;
13 17
  * @returns
14 18
  */
15 19
 const PosterCard = (props) => {
16
-  const [ data, setData ] = useState([])
20
+  const [data, setData] = useState([])
17 21
   const [indexOneUrl, setIndexOneUrl] = useState('')
18 22
   const [indexTwoUrl, setIndexTwoUrl] = useState('')
19 23
   const [indexThreeUrl, setIndexThreeUrl] = useState('')
20 24
   let resultData = []
21 25
 
22
-  useEffect(() => {  
23
-  },[])
26
+  useEffect(() => {
27
+  }, [])
24 28
 
25 29
   const handleUploadIndexOneSucess = url => {
26
-    console.log(url,"第一张图上传回调");
30
+    console.log(url, "第一张图上传回调");
27 31
     setIndexOneUrl(url)
28 32
     resultData[0] = url
29 33
     resultData[1] = indexTwoUrl
@@ -32,7 +36,7 @@ const PosterCard = (props) => {
32 36
   }
33 37
 
34 38
   const handleUploadIndexTwoSucess = url => {
35
-    console.log(url,"第二张图上传回调");
39
+    console.log(url, "第二张图上传回调");
36 40
     setIndexTwoUrl(url)
37 41
     resultData[0] = indexOneUrl
38 42
     resultData[1] = url
@@ -41,7 +45,7 @@ const PosterCard = (props) => {
41 45
   }
42 46
 
43 47
   const handleUploadIndexThreeSucess = url => {
44
-    console.log(url,"第三张图上传回调");
48
+    console.log(url, "第三张图上传回调");
45 49
     setIndexThreeUrl(url)
46 50
     resultData[0] = indexOneUrl
47 51
     resultData[1] = indexTwoUrl
@@ -50,74 +54,80 @@ const PosterCard = (props) => {
50 54
   }
51 55
 
52 56
   return (
53
-    <div>
54 57
 
55 58
     <div style={{ display: 'flex' }}>
56
-      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
57
-        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
58
-          <img style={{ width: '100%', height: '300px' }} src={indexOneUrl} alt="" />
59
-           
60
-          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
61
-            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
62
-            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
63
-            <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} alt="" />
64
-          </div>
59
+
60
+      <div style={{ width: '420px', height: '940px', display: 'inline-block', marginTop: '30px' }}>
61
+        <div style={{ width: '375px', height: '780px', backgroundColor: '#CFCFCF', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
62
+          <img style={{ width: '100%', height: '100%' }} src={indexOneUrl} alt="" />
63
+          <img src={head1} style={{ width: '66px', height: '66px', position: 'absolute', left: '20px', bottom: '38px' }} alt="" />
64
+          <p style={{ margin: '0', fontSize: '18px', position: 'absolute', left: '96px', bottom: '79px', color: '#333' }}>小五子</p>
65
+          <p style={{ margin: '0', fontSize: '15px', position: 'absolute', left: '96px', bottom: '58px', color: '#333' }}>175 1256 0225</p>
66
+          <p style={{ margin: '0', fontSize: '14px', position: 'absolute', left: '96px', bottom: '39px', color: '#666' }}>邀请您参与活动</p>
67
+          <img src={link} style={{ margin: '0', width: '80px', height: '80px', backgroundColor: '#fff', padding: '4px', borderRadius: '6px', position: 'absolute', right: '30px', bottom: '45px' }} alt="" />
68
+          <p style={{ margin: '0', fontSize: '13px', position: 'absolute', right: '30px', bottom: '20px', color: '#666' }}>长按识别更多</p>
69
+
65 70
         </div>
66 71
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
67
-        <Upload showUploadList={false}
68
-        {...uploaderProps}
69
-        onSuccess={handleUploadIndexOneSucess}>
70
-          <Button>
71
-            上传图片
72
+        <p style={{ textAlign: 'center' }}>
73
+          <Upload showUploadList={false}
74
+            {...uploaderProps}
75
+            onSuccess={handleUploadIndexOneSucess}>
76
+            <Button>
77
+              上传图片
72 78
           </Button>
73
-        </Upload>
79
+          </Upload>
80
+        </p>
74 81
       </div>
75
-    </div>
76 82
 
77
-    <div style={{ display: 'flex' }}>
78
-      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
79
-        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
80
-          <img style={{ width: '100%', height: '300px' }} src={indexTwoUrl} alt="" />
81
-           
82
-          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
83
-            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
84
-            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
85
-            <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} alt="" />
83
+      <div style={{ width: '420px', height: '940px', display: 'inline-block', marginTop: '30px' }}>
84
+        <div style={{ width: '375px', height: '780px', backgroundColor: '#CFCFCF', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
85
+          <img style={{ width: '100%', height: '100%' }} src={indexTwoUrl} alt="" />
86
+          <img src={head1} style={{ width: '66px', height: '66px', position: 'absolute', left: '20px', bottom: '122px' }} alt="" />
87
+          <p style={{ margin: '0', fontSize: '18px', position: 'absolute', left: '96px', bottom: '163px', color: '#333' }}>小五子</p>
88
+          <p style={{ margin: '0', fontSize: '15px', position: 'absolute', left: '96px', bottom: '142px', color: '#333' }}>175 1256 0225</p>
89
+          <p style={{ margin: '0', fontSize: '14px', position: 'absolute', left: '96px', bottom: '121px', color: '#666' }}>邀请您参与活动</p>
90
+          <div style={{ margin: '0', width: '100%', height: '112px', backgroundColor: '#fff', position: 'absolute', left: '0px', bottom: '0.5px', }}>
91
+            <p style={{ margin: '0', fontSize: '16px', position: 'absolute', left: '30px', bottom: '58px', color: '#666' }}>长按识别小程序码</p>
92
+            <p style={{ margin: '0', fontSize: '16px', position: 'absolute', left: '30px', bottom: '31px', color: '#666' }}>进入<span style={{ margin: '0 10px', fontSize: '17px', color: '#000' }}>橙蕉</span>查看详情</p>
93
+            <img src={link} style={{ margin: '0', width: '100px', height: '100px', position: 'absolute', right: '20px', bottom: '6px' }} alt="" />
86 94
           </div>
87 95
         </div>
88 96
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
89
-        <Upload showUploadList={false}
90
-        {...uploaderProps}
91
-        onSuccess={handleUploadIndexTwoSucess}>
92
-          <Button>
93
-            上传图片
97
+        <p style={{ textAlign: 'center' }}>
98
+          <Upload showUploadList={false}
99
+            {...uploaderProps}
100
+            onSuccess={handleUploadIndexTwoSucess}>
101
+            <Button>
102
+              上传图片
94 103
           </Button>
95
-        </Upload>
104
+          </Upload></p>
96 105
       </div>
97
-    </div>
98
-    
99
-    <div style={{ display: 'flex' }}>
100
-      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
101
-        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
102
-          <img style={{ width: '100%', height: '300px' }} src={indexThreeUrl} alt="" />
103
-           
104
-          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
105
-            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
106
-            <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
107
-            <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} alt="" />
108
-          </div>
106
+
107
+      <div style={{ width: '420px', height: '940px', display: 'inline-block', marginTop: '30px' }}>
108
+        <div style={{ width: '375px', height: '780px', backgroundColor: '#CFCFCF', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
109
+          <img style={{ width: '100%', height: '100%' }} src={indexThreeUrl} alt="" />
110
+          <img src={head1} style={{ width: '66px', height: '66px', position: 'absolute', left: '20px', bottom: '142px' }} alt="" />
111
+          <p style={{ margin: '0', fontSize: '18px', position: 'absolute', left: '96px', bottom: '183px', color: '#333' }}>小五子</p>
112
+          <p style={{ margin: '0', fontSize: '15px', position: 'absolute', left: '96px', bottom: '162px', color: '#333' }}>175 1256 0225</p>
113
+          <p style={{ margin: '0', fontSize: '14px', position: 'absolute', left: '96px', bottom: '141px', color: '#666' }}>邀请您参与活动</p>
114
+          <div style={{ margin: '0', width: '335px', borderRadius: '6px', height: '112px', backgroundColor: '#fff', position: 'absolute', left: '20px', bottom: '20px', }}></div>
115
+          <p style={{ margin: '0', fontSize: '16px', position: 'absolute', left: '50px', bottom: '78px', color: '#666' }}>长按识别小程序码</p>
116
+          <p style={{ margin: '0', fontSize: '16px', position: 'absolute', left: '50px', bottom: '51px', color: '#666' }}>进入<span style={{ margin: '0 10px', fontSize: '17px', color: '#000' }}>橙蕉</span>查看详情</p>
117
+          <img src={link} style={{ margin: '0', width: '100px', height: '100px', position: 'absolute', right: '50px', bottom: '26px' }} alt="" />
109 118
         </div>
110 119
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
111
-        <Upload showUploadList={false}
112
-        {...uploaderProps}
113
-        onSuccess={handleUploadIndexThreeSucess}>
114
-          <Button>
115
-            上传图片
120
+        <p style={{ textAlign: 'center' }}>
121
+          <Upload showUploadList={false}
122
+            {...uploaderProps}
123
+            onSuccess={handleUploadIndexThreeSucess}>
124
+            <Button>
125
+              上传图片
116 126
           </Button>
117
-        </Upload>
127
+          </Upload>
128
+        </p>
118 129
       </div>
119 130
     </div>
120
-  </div>
121 131
   )
122 132
 }
123 133
 export default PosterCard