Browse Source

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1

张延森 5 years ago
parent
commit
b43b9eebf6

+ 4
- 4
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
-    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    // HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
+    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.0.84:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    HOST: '"http://192.168.0.218:8080"',
13
+    WSS_HOST: '"ws://192.168.0.218:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 1
- 1
project.config.json View File

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "mini-chengjiao",
3
 	"projectname": "mini-chengjiao",
4
 	"description": "知与行联调",
4
 	"description": "知与行联调",
5
-	"appid": "wxd9ee3a9480a4e544",
5
+	"appid": "wxda1f84b79b3edeb3",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

BIN
src/assets/person/nothing.png View File


+ 2
- 0
src/constants/api.js View File

47
 export const API_ITEMS_DETAIL = resolvePath('buildingSelectId')
47
 export const API_ITEMS_DETAIL = resolvePath('buildingSelectId')
48
 export const API_ITEMS_TYPE = resolvePath('tdBuildingType')
48
 export const API_ITEMS_TYPE = resolvePath('tdBuildingType')
49
 export const API_ACTIVITY_GROUP = resolvePath('helpActivityAndGroup')
49
 export const API_ACTIVITY_GROUP = resolvePath('helpActivityAndGroup')
50
+export const API_LOCATION_CITYP = resolvePath('location/city')
51
+// /wx/location/city?location=lon,lat
50
 
52
 
51
 
53
 
52
 // shop
54
 // shop

+ 3
- 1
src/constants/project.js View File

1
 export const PROJECT_LIST = 'PROJECT_LIST'
1
 export const PROJECT_LIST = 'PROJECT_LIST'
2
-export const PROJECT_DETAIL = 'PROJECT_DETAIL'
2
+export const PROJECT_DETAIL = 'PROJECT_DETAIL'
3
+
4
+export const LOCATION_CITY = 'LOCATION_CITY'

+ 2
- 1
src/pages/agent/become/index.js View File

43
     else {
43
     else {
44
       console.log('11111')
44
       console.log('11111')
45
       Taro.showToast({
45
       Taro.showToast({
46
-        title: '请输入渠道码'
46
+        title: '请输入渠道码',
47
+        icon: 'none'
47
       })
48
       })
48
     }
49
     }
49
   }
50
   }

+ 3
- 3
src/pages/card/index.js View File

432
             <ScrollView scrollY>
432
             <ScrollView scrollY>
433
               <View className='mycard__user__info'>
433
               <View className='mycard__user__info'>
434
                 <View className='mycard__user__imgox'>
434
                 <View className='mycard__user__imgox'>
435
-                  <Image className='mycard__user__img' src={picture} mode="aspectFill"></Image>
435
+                  <Image className='mycard__user__img' src={picture} mode="widthFix"></Image>
436
                   <Image src={picture} mode="aspectFill" className='head__img'></Image>
436
                   <Image src={picture} mode="aspectFill" className='head__img'></Image>
437
                 </View>
437
                 </View>
438
-                <Image src={require('@assets/person/top.png')} className='top-img' mode="aspectFill"></Image>
438
+                <Image src={require('@assets/person/top.png')} className='top-img' mode="widthFix"></Image>
439
               </View>
439
               </View>
440
 
440
 
441
               <View className='mycard__user__information'>
441
               <View className='mycard__user__information'>
464
 
464
 
465
                 </View>
465
                 </View>
466
                 <View className='row medal'>
466
                 <View className='row medal'>
467
-                  <Image mode="aspectFill" className="img" src={require('@assets/person/jinpai.png')}></Image>
467
+                  <Image mode="widthFix" className="img" src={require('@assets/person/jinpai.png')}></Image>
468
                   <Text>金牌置业顾问</Text>
468
                   <Text>金牌置业顾问</Text>
469
                 </View>
469
                 </View>
470
 
470
 

+ 7
- 2
src/pages/card/index.scss View File

49
 
49
 
50
   &__imgox {
50
   &__imgox {
51
     width: 100%;
51
     width: 100%;
52
-    height: 550px;
52
+    height: 750px;
53
     overflow: hidden;
53
     overflow: hidden;
54
     position: relative;
54
     position: relative;
55
-  }
56
 
55
 
56
+    
57
+  }
58
+&__img {
59
+     width: 750px;
60
+     height: 750px;
61
+    }
57
   &__info {
62
   &__info {
58
     width: 100%;
63
     width: 100%;
59
     position: relative;
64
     position: relative;

+ 121
- 61
src/pages/person/customerAnalysis/analysis.js View File

10
 import { querySexInfo, getEchartDailyInfo, getEchartMonthInfo } from '@services/person'
10
 import { querySexInfo, getEchartDailyInfo, getEchartMonthInfo } from '@services/person'
11
 import { connect } from '@tarojs/redux'
11
 import { connect } from '@tarojs/redux'
12
 import LineChart from "../../../components/charts/Line";
12
 import LineChart from "../../../components/charts/Line";
13
+const nothing = require('@assets/person/nothing.png')
13
 
14
 
14
 
15
 
15
 @connect(({ user, city }) => ({ user, city }))
16
 @connect(({ user, city }) => ({ user, city }))
136
       } else if (params == 'follow') {
137
       } else if (params == 'follow') {
137
         getEchartMonthInfo(params).then(res => {
138
         getEchartMonthInfo(params).then(res => {
138
           this.setState({
139
           this.setState({
139
-            chartInfo2:  res.map(x => ({ name: `${x.month.substr(4)}月`, value: x.customerNum })) || []
140
+            chartInfo2: res.map(x => ({ name: `${x.month.substr(4)}月`, value: x.customerNum })) || []
140
           })
141
           })
141
         })
142
         })
142
       } else {
143
       } else {
165
         <AtTabs className="tab-bar" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable="false">
166
         <AtTabs className="tab-bar" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable="false">
166
           <AtTabsPane current={current} index={0} >
167
           <AtTabsPane current={current} index={0} >
167
             <View>
168
             <View>
168
-              <View style="height:40rpx;position: relative;margin-top:20rpx">
169
-                <View className="daily-month" >
170
-                  {
171
-                    dailyMonth.map((item, index) => (
172
-                      <View key={index + 'daily'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
173
-                        {item}
174
-                      </View>))
175
-                  }
169
+              {
170
+                chartInfo.length &&
171
+                <View>
172
+                  <View style="height:40rpx;position: relative;margin-top:20rpx">
173
+                    <View className="daily-month" >
174
+                      {
175
+                        dailyMonth.map((item, index) => (
176
+                          <View key={index + 'daily'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
177
+                            {item}
178
+                          </View>))
179
+                      }
180
+                    </View>
181
+                  </View>
182
+                  <View style="width:100vw;height:530rpx;position: relative;">
183
+                    <LineChart source={chartInfo} />
184
+                  </View>
176
                 </View>
185
                 </View>
177
-              </View>
178
-              <View style="width:100vw;height:530rpx;position: relative;">
179
-                <LineChart source={chartInfo} />
180
-              </View>
181
-              <View style="height:20rpx;background:#f5f5f5;"> </View>
182
-              <View style="padding: 40rpx;">
183
-                <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
184
-                {sexInfo.map((item, index) => (
185
-                  <View key={index + 'sex1'} style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
186
-                ))
187
-                }
188
-              </View>
186
+              }
187
+              {
188
+                !chartInfo.length &&
189
+                <View >
190
+                  <Image style="width: 320rpx;height: 260rpx;margin: 60rpx auto 20rpx auto;display:block" src={nothing} />
191
+                  <View style="text-align:center;color:#999;font-size:30rpx;margin-bottom:100rpx;">
192
+                    暂无数据展示
193
+                </View>
194
+                </View>
195
+              }
196
+
197
+              {
198
+                sexInfo.length &&
199
+                <View>
200
+                  <View style="height:20rpx;background:#f5f5f5;"> </View>
201
+                  <View style="padding: 40rpx;">
202
+                    <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
203
+                    {sexInfo.map((item, index) => (
204
+                      <View key={index + 'sex1'} style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
205
+                    ))
206
+                    }
207
+                  </View>
208
+                </View>
209
+              }
210
+
189
             </View>
211
             </View>
190
           </AtTabsPane>
212
           </AtTabsPane>
191
           <AtTabsPane current={current} index={1}>
213
           <AtTabsPane current={current} index={1}>
192
             <View>
214
             <View>
193
-              <View style="height:40rpx;position: relative;margin-top:20rpx">
194
-                <View className="daily-month" >
195
-                  {
196
-                    dailyMonth.map((item, index) => (
197
-                      <View key={index + 'month'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
198
-                        {item}
199
-                      </View>))
200
-                  }
215
+              {chartInfo2.length &&
216
+                <View>
217
+                  <View style="height:40rpx;position: relative;margin-top:20rpx">
218
+                    <View className="daily-month" >
219
+                      {
220
+                        dailyMonth.map((item, index) => (
221
+                          <View key={index + 'month'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
222
+                            {item}
223
+                          </View>))
224
+                      }
225
+                    </View>
226
+                  </View>
227
+                  <View style="width:100vw;height:530rpx;position: relative;">
228
+                    <LineChart source={chartInfo2} />
229
+                  </View>
230
+                </View>
231
+              }
232
+              {
233
+                !chartInfo2.length &&
234
+                <View >
235
+                  <Image style="width: 320rpx;height: 260rpx;margin: 60rpx auto 20rpx auto;display:block" src={nothing} />
236
+                  <View style="text-align:center;color:#999;font-size:30rpx;margin-bottom:100rpx;">
237
+                    暂无数据展示
201
                 </View>
238
                 </View>
202
-              </View>
203
-              <View style="width:100vw;height:530rpx;position: relative;">
204
-                <LineChart source={chartInfo2} />
205
-              </View>
206
-              <View style="height:20rpx;background:#f5f5f5;"> </View>
207
-              <View style="padding: 40rpx;">
208
-                <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
209
-                {sexInfo.map((item, index) => (
210
-                  <View key={index + 'sex2'} style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
211
-                ))
212
-                }
213
-              </View>
239
+                </View>
240
+              }
241
+
242
+              {
243
+                sexInfo.length &&
244
+                <View>
245
+                  <View style="height:20rpx;background:#f5f5f5;"> </View>
246
+                  <View style="padding: 40rpx;">
247
+                    <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
248
+                    {sexInfo.map((item, index) => (
249
+                      <View key={index + 'sex2'} style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
250
+                    ))
251
+                    }
252
+                  </View>
253
+                </View>
254
+              }
214
             </View>
255
             </View>
215
           </AtTabsPane>
256
           </AtTabsPane>
216
           <AtTabsPane current={current} index={2}>
257
           <AtTabsPane current={current} index={2}>
217
             <View>
258
             <View>
218
-              <View style="height:40rpx;position: relative;margin-top:20rpx">
219
-                <View className="daily-month" >
220
-                  {
221
-                    dailyMonth.map((item, index) => (
222
-                      <View key={index + 'day'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
223
-                        {item}
224
-                      </View>))
225
-                  }
259
+              {
260
+                chartInfo3.length &&
261
+                <View>
262
+                  <View style="height:40rpx;position: relative;margin-top:20rpx">
263
+                    <View className="daily-month" >
264
+                      {
265
+                        dailyMonth.map((item, index) => (
266
+                          <View key={index + 'day'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
267
+                            {item}
268
+                          </View>))
269
+                      }
270
+                    </View>
271
+                  </View>
272
+                  <View style="width:100vw;height:530rpx;position: relative;">
273
+                    <LineChart source={chartInfo3} />
274
+                  </View>
275
+                </View>
276
+              }
277
+              {
278
+                !chartInfo3.length &&
279
+                <View >
280
+                  <Image style="width: 320rpx;height: 260rpx;margin: 60rpx auto 20rpx auto;display:block" src={nothing} />
281
+                  <View style="text-align:center;color:#999;font-size:30rpx;margin-bottom:100rpx;">
282
+                    暂无数据展示
283
+                </View>
284
+                </View>
285
+              }
286
+              {
287
+                sexInfo.length &&
288
+                <View>
289
+                  <View style="height:20rpx;background:#f5f5f5;"> </View>
290
+                  <View style="padding: 40rpx;">
291
+                    <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
292
+                    {sexInfo.map((item, index) => (
293
+                      <View key={index + 'sex3'} style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
294
+                    ))
295
+                    }
296
+                  </View>
226
                 </View>
297
                 </View>
227
-              </View>
228
-              <View style="width:100vw;height:530rpx;position: relative;">
229
-                <LineChart source={chartInfo3} />
230
-              </View>
231
-              <View style="height:20rpx;background:#f5f5f5;"> </View>
232
-              <View style="padding: 40rpx;">
233
-                <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
234
-                {sexInfo.map((item, index) => (
235
-                  <View key={index + 'sex3'} style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
236
-                ))
237
-                }
238
-              </View>
298
+              }
239
             </View>
299
             </View>
240
           </AtTabsPane>
300
           </AtTabsPane>
241
         </AtTabs>
301
         </AtTabs>

+ 8
- 8
src/pages/person/menus.js View File

146
     },
146
     },
147
   ],
147
   ],
148
   [
148
   [
149
-    {
150
-      name: '成为专业经纪人',
151
-      url: '/pages/agent/become/index',
152
-      icon: icons.development,
153
-      extends: undefined,
154
-      userTypes: [CUSTOMER, ESTATE_AGENT],
155
-      style: { color: '#888888' },
156
-    },
149
+    // {
150
+    //   name: '成为专业经纪人',
151
+    //   url: '/pages/agent/become/index',
152
+    //   icon: icons.development,
153
+    //   extends: undefined,
154
+    //   userTypes: [CUSTOMER, ESTATE_AGENT],
155
+    //   style: { color: '#888888' },
156
+    // },
157
     {
157
     {
158
       name: '成为置业顾问',
158
       name: '成为置业顾问',
159
       url: '',
159
       url: '',

+ 6
- 4
src/pages/project/album/index.js View File

73
                 const { apartmentName } = item || {}
73
                 const { apartmentName } = item || {}
74
                 const buildingImgList = item.buildingImgList
74
                 const buildingImgList = item.buildingImgList
75
 
75
 
76
-                console.log(imgList, '22333333222')
77
-                return (
76
+                console.log(item, '22333333222')
77
+                return (<View>
78
+                  {buildingImgList.length>0&&
78
                   <View
79
                   <View
79
-                    style={{ width: '100px' }}
80
+                    style={{ padding: '0 20px ' }}
80
                     key={current}
81
                     key={current}
81
                     className={`around-tab__item ${current === index ? 'active' : ''}`}
82
                     className={`around-tab__item ${current === index ? 'active' : ''}`}
82
                     onClick={() => this.setState({ current: index })}
83
                     onClick={() => this.setState({ current: index })}
83
                   >
84
                   >
84
 
85
 
85
                     <View>
86
                     <View>
86
-                      <View style={{ width: '100px', textAlign: 'center' }}>  {`${apartmentName}(${buildingImgList.length})`} </View>
87
+                      <View style={{  textAlign: 'center' }}>  {`${apartmentName}(${buildingImgList.length})`} </View>
87
                     </View>
88
                     </View>
89
+                  </View>}
88
                   </View>
90
                   </View>
89
                 )
91
                 )
90
               })}
92
               })}

+ 88
- 78
src/pages/project/detail/index.js View File

58
     videoPlayShow: 'flex',
58
     videoPlayShow: 'flex',
59
   }
59
   }
60
 
60
 
61
-  componentWillMount() {
61
+  componentWillMount () {
62
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
62
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
63
 
63
 
64
     ready.queue(() => {
64
     ready.queue(() => {
92
     })
92
     })
93
   }
93
   }
94
 
94
 
95
-  componentWillUnmount() {
95
+  componentWillUnmount () {
96
     const { recordId } = this.state
96
     const { recordId } = this.state
97
     recordId && updatePoint(recordId)
97
     recordId && updatePoint(recordId)
98
   }
98
   }
99
 
99
 
100
-  loadHelpGroupList() {
100
+  loadHelpGroupList () {
101
     const { buildingId } = this.state
101
     const { buildingId } = this.state
102
 
102
 
103
     queryHelpGroup({ buildingId: buildingId }).then(res => {
103
     queryHelpGroup({ buildingId: buildingId }).then(res => {
119
     )
119
     )
120
   }
120
   }
121
 
121
 
122
-  loadDetail() {
122
+  loadDetail () {
123
     const { buildingId } = this.state
123
     const { buildingId } = this.state
124
     const { dispatchProjectDetail } = this.props
124
     const { dispatchProjectDetail } = this.props
125
     this.setState({
125
     this.setState({
147
     })
147
     })
148
   }
148
   }
149
 
149
 
150
-  loadActivityData() {
150
+  loadActivityData () {
151
     const { buildingId } = this.state
151
     const { buildingId } = this.state
152
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
152
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
153
     queryActivityList(payload).then(res => {
153
     queryActivityList(payload).then(res => {
157
     })
157
     })
158
   }
158
   }
159
 
159
 
160
-  loadNewsData() {
160
+  loadNewsData () {
161
     const { buildingId } = this.state
161
     const { buildingId } = this.state
162
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
162
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
163
     queryNewsList(payload).then(res => {
163
     queryNewsList(payload).then(res => {
167
     })
167
     })
168
   }
168
   }
169
 
169
 
170
-  navigateTo(url) {
170
+  navigateTo (url) {
171
     Taro.navigateTo({ url: url })
171
     Taro.navigateTo({ url: url })
172
   }
172
   }
173
   // 海报预览图
173
   // 海报预览图
174
-  previewImage(arr) {
174
+  previewImage (arr) {
175
     // console.log('arr:' + arr)
175
     // console.log('arr:' + arr)
176
     if (arr[0].length > 1) {
176
     if (arr[0].length > 1) {
177
       Taro.previewImage({
177
       Taro.previewImage({
198
     })
198
     })
199
   }
199
   }
200
 
200
 
201
-  openMap() {
201
+  openMap () {
202
     const {
202
     const {
203
       buildingName,
203
       buildingName,
204
       address,
204
       address,
225
     })
225
     })
226
   }
226
   }
227
 
227
 
228
-  toViewAlbum() {
228
+  toViewAlbum () {
229
     const { buildingId } = this.state
229
     const { buildingId } = this.state
230
     this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
230
     this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
231
   }
231
   }
232
 
232
 
233
-  onViewFans() {
233
+  onViewFans () {
234
     const { buildingId } = this.state
234
     const { buildingId } = this.state
235
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
235
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
236
   }
236
   }
259
     }
259
     }
260
   }
260
   }
261
 
261
 
262
-  getPhoneNumber(e, item) {
262
+  getPhoneNumber (e, item) {
263
     getUserPhone(e, (phoneNumber) => {
263
     getUserPhone(e, (phoneNumber) => {
264
       const { userInfo: { person: { personId, nickname, name } } } = this.props
264
       const { userInfo: { person: { personId, nickname, name } } } = this.props
265
       Taro.navigateTo({
265
       Taro.navigateTo({
268
     })
268
     })
269
   }
269
   }
270
 
270
 
271
-  getPosterData() {
271
+  getPosterData () {
272
     return new Promise(resolve => {
272
     return new Promise(resolve => {
273
       const { posterData } = this.state
273
       const { posterData } = this.state
274
       if (posterData.qrcode) {
274
       if (posterData.qrcode) {
339
     })
339
     })
340
   }
340
   }
341
 
341
 
342
-  handleTelClick(item, e) {
342
+  handleTelClick (item, e) {
343
     e.stopPropagation()
343
     e.stopPropagation()
344
     Taro.makePhoneCall({
344
     Taro.makePhoneCall({
345
       phoneNumber: item.phone
345
       phoneNumber: item.phone
346
     })
346
     })
347
   }
347
   }
348
 
348
 
349
-  handleChatClick(item, e) {
349
+  handleChatClick (item, e) {
350
     e.stopPropagation()
350
     e.stopPropagation()
351
     const { userInfo: { person: { personId, nickname, name } } } = this.props
351
     const { userInfo: { person: { personId, nickname, name } } } = this.props
352
     Taro.navigateTo({
352
     Taro.navigateTo({
354
     })
354
     })
355
   }
355
   }
356
 
356
 
357
-  handleConsuItemClick(item) {
357
+  handleConsuItemClick (item) {
358
     Taro.navigateTo({
358
     Taro.navigateTo({
359
       url: `/pages/card/index?id=${item.id}`
359
       url: `/pages/card/index?id=${item.id}`
360
     })
360
     })
361
   }
361
   }
362
 
362
 
363
-  handleMoreClick() {
363
+  handleMoreClick () {
364
     // App.zhuge.track('查看置业顾问列表')
364
     // App.zhuge.track('查看置业顾问列表')
365
     Taro.navigateTo({
365
     Taro.navigateTo({
366
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
366
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
367
     })
367
     })
368
   }
368
   }
369
 
369
 
370
-  handleStopPropagation(e) {
370
+  handleStopPropagation (e) {
371
     e.stopPropagation()
371
     e.stopPropagation()
372
   }
372
   }
373
 
373
 
374
-  toRecomonedPage() {
374
+  toRecomonedPage () {
375
     const {
375
     const {
376
       userInfo: { person: { personType } }
376
       userInfo: { person: { personType } }
377
     } = this.props
377
     } = this.props
387
     }
387
     }
388
   }
388
   }
389
 
389
 
390
-  toHome() {
390
+  toHome () {
391
     Taro.switchTab({
391
     Taro.switchTab({
392
       url: `/pages/project/index`
392
       url: `/pages/project/index`
393
     })
393
     })
394
   }
394
   }
395
 
395
 
396
-  HandleCircumTabClick(id) {
396
+  HandleCircumTabClick (id) {
397
     this.setState({
397
     this.setState({
398
       curTab: id
398
       curTab: id
399
     })
399
     })
400
   }
400
   }
401
 
401
 
402
-  handleNewsMoreClick() {
402
+  handleNewsMoreClick () {
403
     Taro.navigateTo({
403
     Taro.navigateTo({
404
       url: `/pages/news/index?buildingId=` + this.state.buildingId
404
       url: `/pages/news/index?buildingId=` + this.state.buildingId
405
     })
405
     })
406
   }
406
   }
407
 
407
 
408
-  handNewsItemClick(id) {
408
+  handNewsItemClick (id) {
409
     Taro.navigateTo({
409
     Taro.navigateTo({
410
       url: '/pages/news/detail/index?id=' + id
410
       url: '/pages/news/detail/index?id=' + id
411
     })
411
     })
412
   }
412
   }
413
 
413
 
414
-  handleActivityMoreClick() {
414
+  handleActivityMoreClick () {
415
     Taro.navigateTo({
415
     Taro.navigateTo({
416
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
416
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
417
     })
417
     })
418
   }
418
   }
419
 
419
 
420
-  handActivityItemClick(id) {
420
+  handActivityItemClick (id) {
421
     Taro.navigateTo({
421
     Taro.navigateTo({
422
       url: '/pages/activity/detail/index?id=' + id
422
       url: '/pages/activity/detail/index?id=' + id
423
     })
423
     })
424
   }
424
   }
425
 
425
 
426
-  handlePreviewHxImage(current, urls) {
426
+  handlePreviewHxImage (current, urls) {
427
     Taro.previewImage({
427
     Taro.previewImage({
428
       current,
428
       current,
429
       urls
429
       urls
430
     })
430
     })
431
   }
431
   }
432
 
432
 
433
-  handleFavor() {
433
+  handleFavor () {
434
     const { buildingId, isSaved } = this.state
434
     const { buildingId, isSaved } = this.state
435
     if (isSaved) {
435
     if (isSaved) {
436
       cancelFavorProject(buildingId).then(res => {
436
       cancelFavorProject(buildingId).then(res => {
460
       console.log('活动项目收藏')
460
       console.log('活动项目收藏')
461
     })
461
     })
462
   }
462
   }
463
-  handleToolsClick() {
463
+  handleToolsClick () {
464
     Taro.navigateTo({
464
     Taro.navigateTo({
465
       url: `/pages/toolKit/index`
465
       url: `/pages/toolKit/index`
466
     })
466
     })
467
   }
467
   }
468
-  moreFloor() {
468
+  moreFloor () {
469
     Taro.navigateTo({
469
     Taro.navigateTo({
470
       url: `/pages/project/floor/index`
470
       url: `/pages/project/floor/index`
471
     })
471
     })
472
   }
472
   }
473
 
473
 
474
-  renderBottomMenu() {
474
+  renderBottomMenu () {
475
     const { userInfo: { person: { personType } } } = this.props
475
     const { userInfo: { person: { personType } } } = this.props
476
     const { posterShow } = this.state
476
     const { posterShow } = this.state
477
     return (
477
     return (
506
     )
506
     )
507
   }
507
   }
508
 
508
 
509
-  previewHouseImage(current, urls) {
509
+  previewHouseImage (current, urls) {
510
     Taro.previewImage({
510
     Taro.previewImage({
511
       current,
511
       current,
512
       urls
512
       urls
513
     })
513
     })
514
   }
514
   }
515
 
515
 
516
-  renderBuildingProjectTypeList() {
516
+  renderBuildingProjectTypeList () {
517
     const { statusOpts } = this.state
517
     const { statusOpts } = this.state
518
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
518
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
519
     return (
519
     return (
573
   }
573
   }
574
 
574
 
575
 
575
 
576
-  renderPhotoAlbum() {
576
+  renderPhotoAlbum () {
577
     const { projectDetail: { buildingApartment } } = this.props
577
     const { projectDetail: { buildingApartment } } = this.props
578
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
578
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
579
-    const imgList = list.reduce((prev, cur) => {
580
-      prev = prev.concat(cur.buildingImgList)
581
-      return prev
582
-    }, [])
579
+    // const imgList = list.reduce((prev, cur) => {
580
+    //   prev = prev.concat(cur.buildingImgList)
581
+    //   return prev
582
+    // }, [])
583
+
583
 
584
 
584
-    const { albumCurrent } = this.state
585
 
585
 
586
 
586
 
587
 
587
 
588
     return (
588
     return (
589
 
589
 
590
 
590
 
591
-      <Block>
591
+      <Block> {console.log(list, 'list')}
592
         {list.length > 0 &&
592
         {list.length > 0 &&
593
           (
593
           (
594
             <View className='photos__type'>
594
             <View className='photos__type'>
598
 
598
 
599
                   <View className="around-tab">
599
                   <View className="around-tab">
600
                     {list.map((item, index) => {
600
                     {list.map((item, index) => {
601
-                      const { apartmentName } = item || {}
602
-                      const buildingImgList = item.buildingImgList
603
-
604
-
605
-                      return (
606
-                        <View
607
-                          style={{ marginRight: '8px' }}
608
-                        >
609
-                          {/* {`${label}(${num})`} */}
610
-                          <View>
611
-                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
612
-                            <View style={{ textAlign: 'center' }}>  {`${apartmentName}(${buildingImgList.length})`} </View>
613
-                          </View>
614
-                        </View>
615
-                      )
616
-                    })}
601
+                      const { apartmentName } = item
602
+                      const buildingImgList = item.buildingImgList 
603
+                      const buildingImgUrl = buildingImgList.length > 0 ? buildingImgList[0].url : null
604
+
605
+                      console.log(buildingImgUrl, 'buildingImgUrl')
606
+
607
+                      // if (buildingImgUrl != null) {
608
+                        return (<View>
609
+                         {buildingImgUrl != null&& (<View
610
+                            style={{ marginRight: '8px' }}
611
+                          >
612
+
613
+                            <View>
614
+                              <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
615
+                              <View style={{ textAlign: 'center', width: '218rpx', display: 'flex' }}>
616
+                                <View style={{ textAlign: 'center', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
617
+
618
+                                <View>({buildingImgList.length})</View>
619
+                              </View>
620
+                            </View>
621
+                          </View>)}</View>
622
+                        )
623
+                      // }
624
+
625
+                    })
626
+                    }
617
                   </View>
627
                   </View>
618
                 </View>
628
                 </View>
619
               </ScrollView>
629
               </ScrollView>
623
       </Block>
633
       </Block>
624
     )
634
     )
625
   }
635
   }
626
-  rendercircum() {
636
+  rendercircum () {
627
     const building = {
637
     const building = {
628
       ...this.props.projectDetail
638
       ...this.props.projectDetail
629
     }
639
     }
640
     )
650
     )
641
   }
651
   }
642
 
652
 
643
-  renderConsuler() {
653
+  renderConsuler () {
644
     const { userInfo: { person: { phone } } } = this.props
654
     const { userInfo: { person: { phone } } } = this.props
645
     const { projectDetail: { consultants = [] } } = this.props
655
     const { projectDetail: { consultants = [] } } = this.props
646
     return (
656
     return (
694
     )
704
     )
695
   }
705
   }
696
 
706
 
697
-  renderStatement() {
707
+  renderStatement () {
698
     return (
708
     return (
699
       <View className='statement'>
709
       <View className='statement'>
700
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
710
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
703
   }
713
   }
704
 
714
 
705
 
715
 
706
-  renderHelp() {
716
+  renderHelp () {
707
     const { helpList } = this.state
717
     const { helpList } = this.state
708
     return (
718
     return (
709
       <Block>
719
       <Block>
724
     )
734
     )
725
   }
735
   }
726
 
736
 
727
-  handleHelpClick(item) {
737
+  handleHelpClick (item) {
728
     Taro.navigateTo({
738
     Taro.navigateTo({
729
       url: '/pages/activity/detail/assistance?id=' + item.activityId
739
       url: '/pages/activity/detail/assistance?id=' + item.activityId
730
     })
740
     })
731
   }
741
   }
732
-  handleGroupClick(item) {
742
+  handleGroupClick (item) {
733
     Taro.navigateTo({
743
     Taro.navigateTo({
734
       url: '/pages/activity/detail/assemble?id=' + item.activityId
744
       url: '/pages/activity/detail/assemble?id=' + item.activityId
735
     })
745
     })
736
   }
746
   }
737
-  renderGroup() {
747
+  renderGroup () {
738
     const { groupList } = this.state
748
     const { groupList } = this.state
739
     return (
749
     return (
740
       <Block>
750
       <Block>
757
     )
767
     )
758
   }
768
   }
759
 
769
 
760
-  renderHouseTypeList() {
770
+  renderHouseTypeList () {
761
     const { statusOpts } = this.state
771
     const { statusOpts } = this.state
762
     const { projectDetail: { buildingApartment } } = this.props
772
     const { projectDetail: { buildingApartment } } = this.props
763
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
773
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
874
       </Block>
884
       </Block>
875
     )
885
     )
876
   }
886
   }
877
-  renderNews() {
887
+  renderNews () {
878
     const { newsList } = this.state
888
     const { newsList } = this.state
879
     return (
889
     return (
880
       <Block>
890
       <Block>
915
     videoContext.play()
925
     videoContext.play()
916
   }
926
   }
917
 
927
 
918
-  onPlay() {
919
-    console.log()
920
-    this.setState({
921
-      videoPlayShow: 'none'
922
-    })
923
-  }
928
+  // onPlay () {
929
+  //   console.log()
930
+  //   this.setState({
931
+  //     videoPlayShow: 'none'
932
+  //   })
933
+  // }
924
 
934
 
925
-  onPause() {
926
-    this.setState({
927
-      videoPlayShow: 'flex'
928
-    })
929
-  }
935
+  // onPause() {
936
+  //   this.setState({
937
+  //     videoPlayShow: 'flex'
938
+  //   })
939
+  // }
930
 
940
 
931
 
941
 
932
-  renderVideo() {
942
+  renderVideo () {
933
     const { videoPlayShow } = this.state
943
     const { videoPlayShow } = this.state
934
     const { projectDetail } = this.props
944
     const { projectDetail } = this.props
935
     const { videoImage } = projectDetail
945
     const { videoImage } = projectDetail
978
     )
988
     )
979
   }
989
   }
980
 
990
 
981
-  changeCurrent(current) {
991
+  changeCurrent (current) {
982
     this.setState({
992
     this.setState({
983
       current: current + 1
993
       current: current + 1
984
     })
994
     })
985
   }
995
   }
986
 
996
 
987
-  render() {
997
+  render () {
988
     const { posterStatus, posterData, loaded, btnstate } = this.state
998
     const { posterStatus, posterData, loaded, btnstate } = this.state
989
     const { projectDetail } = this.props
999
     const { projectDetail } = this.props
990
     const { uvList = {} } = projectDetail
1000
     const { uvList = {} } = projectDetail

+ 53
- 24
src/pages/project/index.js View File

8
 
8
 
9
 
9
 
10
 import ready from '@utils/ready'
10
 import ready from '@utils/ready'
11
+import { getLocationCity } from '@services/map'
11
 
12
 
12
 import { queryBanners, savePoint, updatePoint } from '@services/common'
13
 import { queryBanners, savePoint, updatePoint } from '@services/common'
13
 import { queryNewsList, queryHelpGroup } from '@services/news'
14
 import { queryNewsList, queryHelpGroup } from '@services/news'
95
     Taro.getLocation().then(location => {
96
     Taro.getLocation().then(location => {
96
       Taro.setStorageSync('lat', location.latitude)
97
       Taro.setStorageSync('lat', location.latitude)
97
       Taro.setStorageSync('lon', location.longitude)
98
       Taro.setStorageSync('lon', location.longitude)
99
+      console.log(location, 'location')
98
 
100
 
101
+      const payload = { location: `${location.longitude},${location.latitude}` }
102
+      console.log(payload, 'payload')
99
 
103
 
100
-      this.qqmapsdk.reverseGeocoder({
101
-        location,
102
-        success: (res) => {
103
-          // debugger
104
-          let city = res.result.address_component.city
104
+      getLocationCity(payload).then(res => {
105
+        let cityId = res.id
106
+        let curCity = cityList.filter(item => {
107
+          return item.id == cityId
108
+        })
109
+
110
+        Taro.showToast({
111
+          title: `当前定位城市:${res.name}`,
112
+          icon: 'none',
113
+        })
114
+
115
+        this.updateCity(curCity[0] || defaultCity[0])
116
+        console.log(curCity, 'location')
117
+
118
+
119
+        // this.qqmapsdk.getLocationCity({
120
+
121
+
122
+        //   location,
123
+        //   success: (res) => {
124
+        //     // debugger
125
+        //     let city = res.result.address_component.city
105
 
126
 
106
-          console.log('-----city-->', city)
107
-          console.log('-----cityList-->', cityList)
127
+        //     console.log('-----city-->', city)
128
+        //     console.log('-----cityList-->', cityList)
108
 
129
 
109
 
130
 
110
-          let curCity = cityList.filter(item => {
111
-            return item.name == city
112
-          })
131
+        //     let curCity = cityList.filter(item => {
132
+        //       return item.name == city
133
+        //     })
113
 
134
 
114
 
135
 
115
 
136
 
116
 
137
 
117
-          Taro.showToast({
118
-            title: `当前定位城市:${(curCity[0] || {}).name}`,
119
-            icon: 'none',
120
-          })
138
+        //     Taro.showToast({
139
+        //       title: `当前定位城市:${(curCity[0] || {}).name}`,
140
+        //       icon: 'none',
141
+        //     })
121
 
142
 
122
-          this.updateCity(curCity[0] || defaultCity[0])
123
-        },
124
-        fail: (error) => {
143
+        //     this.updateCity(curCity[0] || defaultCity[0])
144
+        //   },
145
+        //   fail: (error) => {
125
 
146
 
126
 
147
 
127
-          Taro.showToast({
128
-            title: `定位错误: ${error.message}`,
129
-            icon: 'none',
130
-          })
131
-          console.error(err)
132
-          this.updateCity(defaultCity[0])
133
-        },
148
+        //     Taro.showToast({
149
+        //       title: `定位错误: ${error.message}`,
150
+        //       icon: 'none',
151
+        //     })
152
+        //     console.error(err)
153
+        //     this.updateCity(defaultCity[0])
154
+        //   },
155
+      }).catch(err=>{
156
+               Taro.showToast({
157
+              title: `定位错误: ${error.message}`,
158
+              icon: 'none',
159
+            })
160
+            console.error(err)
161
+            this.updateCity(defaultCity[0])
134
       })
162
       })
135
     }).catch(err => {
163
     }).catch(err => {
136
       if (err.errMsg === 'getLocation:fail auth deny') {
164
       if (err.errMsg === 'getLocation:fail auth deny') {
185
   }
213
   }
186
   loadBannerList () {
214
   loadBannerList () {
187
     const { curCity } = this.props
215
     const { curCity } = this.props
216
+    console.log(this.props,'this.props')
188
     // 获取首页banner
217
     // 获取首页banner
189
     const payload = {
218
     const payload = {
190
       showPosition: 'index'
219
       showPosition: 'index'

+ 14
- 0
src/services/map.js View File

1
+
2
+
3
+import { fetch } from '@utils/request'
4
+import {
5
+  API_LOCATION_CITYP
6
+
7
+} from '@constants/api'
8
+
9
+
10
+/**
11
+ * 获取名片列表
12
+ * @param {*} payload 
13
+ */
14
+export const getLocationCity = payload => fetch({ url: API_LOCATION_CITYP, payload })

+ 1
- 1
src/utils/request.js View File

28
  */
28
  */
29
 export const fetch = async (options) => {
29
 export const fetch = async (options) => {
30
   const { url, payload, method = 'GET', showToast = true, autoLogin = true } = options
30
   const { url, payload, method = 'GET', showToast = true, autoLogin = true } = options
31
-
31
+  console.log(Taro.getStorageSync('token'),'----token---')
32
   return Taro.request({
32
   return Taro.request({
33
     url,
33
     url,
34
     method,
34
     method,