许静 hace 5 años
padre
commit
811010498b

BIN
src/assets/xiaochengxu.png Ver fichero


+ 22
- 7
src/pages/building/list/add/components/poster.jsx Ver fichero

@@ -7,8 +7,8 @@ import BuildSelect from '../../../../../components/SelectButton/BuildSelect'
7 7
 import XForm, { FieldTypes } from '../../../../../components/XForm';
8 8
 import Wangedit from '../../../../../components/Wangedit/Wangedit'
9 9
 import request from '../../../../../utils/request'
10
-import PosterBottom from '../../../../../assets/bottom.png'
11 10
 import yinhao from '../../../../../assets/yinhao.png'
11
+import xiaochengxu from '../../../../../assets/xiaochengxu.png'
12 12
 import ImageUploader from '../../../../../components/XForm/ImageUpload';
13 13
 import poster1 from '../../../../../assets/poster1.png';
14 14
 import poster2 from '../../../../../assets/poster2.png';
@@ -46,17 +46,28 @@ const Poster = props => {
46 46
       })
47 47
 
48 48
       getById(buildingId)
49
+      getMiniappName()
49 50
     }, [])
50 51
   }
51 52
 
52 53
   // 获取详情信息
53 54
   function getById(currentId) {
54
- 
55
+
55 56
     request({ ...apis.building.buildingGetById, urlData: { id: currentId } }).then(res => {
56 57
       setBuilding(res)
57 58
       console.log('getById: ', res)
58 59
     })
59 60
   }
61
+  // 获取小程序名称
62
+  const [miniappName, setMiniappName] = useState('')
63
+  function getMiniappName(currentId) {
64
+
65
+    request({ ...apis.building.getMiniappName }).then(res => {
66
+    
67
+      setMiniappName(res)
68
+     
69
+    })
70
+  }
60 71
 
61 72
   const submitPoster = () => {
62 73
     if (buildingId) {
@@ -90,7 +101,7 @@ const Poster = props => {
90 101
     <div style={{ display: 'flex' }}>
91 102
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
92 103
         <div style={{ width: '375px', height: '785px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
93
-          <img style={{ width: '100%', height: '300px' }} src={ imgValue || ( building.buildingImg[0].url || poster1 ) } alt="" />
104
+          <img style={{ width: '100%', height: '300px' }} src={imgValue || (building.buildingImg[0].url || poster1)} alt="" />
94 105
 
95 106
           <p className={Styles.tagLabel}>
96 107
             {
@@ -99,13 +110,13 @@ const Poster = props => {
99 110
           </p>
100 111
           <p style={{
101 112
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
102
-            display: '-webkit-box', lineClamp: '3', height: '36px',lineHeight:'36px',
113
+            display: '-webkit-box', lineClamp: '3', height: '36px', lineHeight: '36px',
103 114
             WebkitLineClamp: '1',
104 115
             WebkitBoxOrient: 'vertical',
105 116
             overflow: 'hidden',
106 117
             textOverflow: 'ellipsis',
107 118
           }}>{inputValue || (building.buildingName || '海报标题')}</p>
108
-          <p style={{ color: '#999',padding:' 0 20px' }}>约<span style={{ color: '#fd0d0c', fontSize: '24px',marginLeft:'6px' }}>{ building.price }</span><span style={{ color: '#fd0d0c', fontSize: '20px' }}>元/m²</span></p>
119
+          <p style={{ color: '#999', padding: ' 0 20px' }}>约<span style={{ color: '#fd0d0c', fontSize: '24px', marginLeft: '6px' }}>{building.price}</span><span style={{ color: '#fd0d0c', fontSize: '20px' }}>元/m²</span></p>
109 120
 
110 121
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
111 122
           <p style={{
@@ -116,14 +127,18 @@ const Poster = props => {
116 127
             overflow: 'hidden',
117 128
             textOverflow: 'ellipsis',
118 129
           }}>{textAreaValue || '海报描述'}</p>
119
-          <img src={PosterBottom} style={{ width: '100%' }} alt="" />
130
+          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc',position:'relative' }}>
131
+            <p style={{margin:'0',fontSize:'18px',color:'#888'}}>长按识别小程序码</p>
132
+            <p style={{margin:'0',fontSize:'18px',color:'#888'}}>进入<span style={{margin:'0 5px',fontSize:'18px',color:'#333',fontWeight:'600'}}>{miniappName||'置业V顾问'}</span>报名活动</p>
133
+            <img style={{ width: '80px',position: 'absolute',right:'30px',top:'10px' }} src={xiaochengxu} alt="" />
134
+          </div>
120 135
         </div>
121 136
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
122 137
       </div>
123 138
       <div >
124 139
         <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
125 140
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报图片</p>
126
-          <ImageUploader value={ imgValue } onChange={e => changeImg(e)} />
141
+          <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
127 142
         </div>
128 143
         <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
129 144
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>

+ 3
- 3
src/pages/indexEcharts/components/UserSex.jsx Ver fichero

@@ -25,7 +25,7 @@ const UserSource = (props) => {
25 25
     UserSex(formatDate(startDate, endDate))
26 26
   }, [])
27 27
 
28
-  function UserSex (params) {
28
+  function UserSex(params) {
29 29
     request({
30 30
       ...apis.indexEcharts.userSex,
31 31
       params,
@@ -35,7 +35,7 @@ const UserSource = (props) => {
35 35
   }
36 36
 
37 37
   const dataset = (data.selectSexUser) || []
38
- 
38
+
39 39
   const options = {
40 40
     title: {
41 41
       text: '性别比例'
@@ -60,7 +60,7 @@ const UserSource = (props) => {
60 60
   const piestyles = {
61 61
     width: '100%',
62 62
     height: '400px',
63
-    minWidth:'350px'
63
+    minWidth: '350px'
64 64
 
65 65
   }
66 66
 

+ 6
- 1
src/services/apis.js Ver fichero

@@ -92,7 +92,12 @@ export default {
92 92
       url: `${prefix}/buildinglist/select`,
93 93
       method: 'GET',
94 94
       action: 'select',
95
-    }
95
+    },
96
+    getMiniappName: {
97
+      url: `${prefix}/getMiniappName`,
98
+      method: 'GET',
99
+      action: 'select',
100
+    },
96 101
   },
97 102
   buildingType: {
98 103
     getList: {