许静 5 years ago
parent
commit
811010498b

BIN
src/assets/xiaochengxu.png View File


+ 22
- 7
src/pages/building/list/add/components/poster.jsx View File

7
 import XForm, { FieldTypes } from '../../../../../components/XForm';
7
 import XForm, { FieldTypes } from '../../../../../components/XForm';
8
 import Wangedit from '../../../../../components/Wangedit/Wangedit'
8
 import Wangedit from '../../../../../components/Wangedit/Wangedit'
9
 import request from '../../../../../utils/request'
9
 import request from '../../../../../utils/request'
10
-import PosterBottom from '../../../../../assets/bottom.png'
11
 import yinhao from '../../../../../assets/yinhao.png'
10
 import yinhao from '../../../../../assets/yinhao.png'
11
+import xiaochengxu from '../../../../../assets/xiaochengxu.png'
12
 import ImageUploader from '../../../../../components/XForm/ImageUpload';
12
 import ImageUploader from '../../../../../components/XForm/ImageUpload';
13
 import poster1 from '../../../../../assets/poster1.png';
13
 import poster1 from '../../../../../assets/poster1.png';
14
 import poster2 from '../../../../../assets/poster2.png';
14
 import poster2 from '../../../../../assets/poster2.png';
46
       })
46
       })
47
 
47
 
48
       getById(buildingId)
48
       getById(buildingId)
49
+      getMiniappName()
49
     }, [])
50
     }, [])
50
   }
51
   }
51
 
52
 
52
   // 获取详情信息
53
   // 获取详情信息
53
   function getById(currentId) {
54
   function getById(currentId) {
54
- 
55
+
55
     request({ ...apis.building.buildingGetById, urlData: { id: currentId } }).then(res => {
56
     request({ ...apis.building.buildingGetById, urlData: { id: currentId } }).then(res => {
56
       setBuilding(res)
57
       setBuilding(res)
57
       console.log('getById: ', res)
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
   const submitPoster = () => {
72
   const submitPoster = () => {
62
     if (buildingId) {
73
     if (buildingId) {
90
     <div style={{ display: 'flex' }}>
101
     <div style={{ display: 'flex' }}>
91
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
102
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
92
         <div style={{ width: '375px', height: '785px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
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
           <p className={Styles.tagLabel}>
106
           <p className={Styles.tagLabel}>
96
             {
107
             {
99
           </p>
110
           </p>
100
           <p style={{
111
           <p style={{
101
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
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
             WebkitLineClamp: '1',
114
             WebkitLineClamp: '1',
104
             WebkitBoxOrient: 'vertical',
115
             WebkitBoxOrient: 'vertical',
105
             overflow: 'hidden',
116
             overflow: 'hidden',
106
             textOverflow: 'ellipsis',
117
             textOverflow: 'ellipsis',
107
           }}>{inputValue || (building.buildingName || '海报标题')}</p>
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
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
121
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
111
           <p style={{
122
           <p style={{
116
             overflow: 'hidden',
127
             overflow: 'hidden',
117
             textOverflow: 'ellipsis',
128
             textOverflow: 'ellipsis',
118
           }}>{textAreaValue || '海报描述'}</p>
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
         </div>
135
         </div>
121
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
136
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
122
       </div>
137
       </div>
123
       <div >
138
       <div >
124
         <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
139
         <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
125
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报图片</p>
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
         </div>
142
         </div>
128
         <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
143
         <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
129
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
144
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>

+ 3
- 3
src/pages/indexEcharts/components/UserSex.jsx View File

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

+ 6
- 1
src/services/apis.js View File

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