Przeglądaj źródła

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

许静 5 lat temu
rodzic
commit
f15ac17258

+ 5
- 4
src/pages/building/list/add/components/poster.jsx Wyświetl plik

@@ -24,7 +24,7 @@ const Poster = props => {
24 24
   const [imgValue, changeImg] = useState('')
25 25
   const [posterId, setPosterId] = useState('')
26 26
 
27
-  const [building, setBuilding] = useState({})
27
+  const [building, setBuilding] = useState({ buildingImg: [{ url: '' }] })
28 28
   const { buildingId } = props.building
29 29
 
30 30
   if (buildingId) {
@@ -54,6 +54,7 @@ const Poster = props => {
54 54
  
55 55
     request({ ...apis.building.buildingGetById, urlData: { id: currentId } }).then(res => {
56 56
       setBuilding(res)
57
+      console.log('getById: ', res)
57 58
     })
58 59
   }
59 60
 
@@ -89,7 +90,7 @@ const Poster = props => {
89 90
     <div style={{ display: 'flex' }}>
90 91
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
91 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' }}>
92
-          <img style={{ width: '100%', height: '300px' }} src={imgValue || poster1} alt="" />
93
+          <img style={{ width: '100%', height: '300px' }} src={ imgValue || ( building.buildingImg[0].url || poster1 ) } alt="" />
93 94
 
94 95
           <p className={Styles.tagLabel}>
95 96
             {
@@ -103,7 +104,7 @@ const Poster = props => {
103 104
             WebkitBoxOrient: 'vertical',
104 105
             overflow: 'hidden',
105 106
             textOverflow: 'ellipsis',
106
-          }}>{building.buildingName || '楼盘标题'}</p>
107
+          }}>{inputValue || (building.buildingName || '海报标题')}</p>
107 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>
108 109
 
109 110
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
@@ -122,7 +123,7 @@ const Poster = props => {
122 123
       <div >
123 124
         <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
124 125
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报图片</p>
125
-          <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
126
+          <ImageUploader value={ imgValue } onChange={e => changeImg(e)} />
126 127
         </div>
127 128
         <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
128 129
           <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>

+ 1
- 1
src/pages/indexEcharts/components/UserBehavior.jsx Wyświetl plik

@@ -133,7 +133,7 @@ const UserBehavior = props => {
133 133
   }
134 134
 
135 135
 
136
-  const seriesMaker = (data.selectUserBehavior || []).filter(e => e.activity !== '客户').reduce((series, item) => {
136
+  const seriesMaker = (data.selectUserBehavior || []).filter(e => e.activity !== '客户' && e.activity !== '首页').reduce((series, item) => {
137 137
     let { date, activityCount, activity } = item
138 138
     date = moment(date).format('YYYY-MM-DD')
139 139
     if (!activityCount) activityCount = 0