周立森 5 년 전
부모
커밋
13d32f390e

+ 2
- 2
config/dev.js 파일 보기

9
     // WSS_HOST: '"wss://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.170:8080"',
13
-    WSS_HOST: '"ws://192.168.0.170: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: {}

+ 2
- 0
src/constants/api.js 파일 보기

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 파일 보기

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'

+ 3
- 3
src/pages/agent/client/index.js 파일 보기

125
                         </View>
125
                         </View>
126
                         <View className='client__top'>
126
                         <View className='client__top'>
127
                           <View className='client__infor'>
127
                           <View className='client__infor'>
128
-                            <Text className='client__name'>{item.name}  &emsp;</Text>
128
+                            <Text className='client__name'>{item.name} </Text>
129
                             <Image className='sex' src={item.sex == 1 ? require('@assets/person/guest/man.png') : require('@assets/person/guest/women.png')} mode='widthFix'></Image>
129
                             <Image className='sex' src={item.sex == 1 ? require('@assets/person/guest/man.png') : require('@assets/person/guest/women.png')} mode='widthFix'></Image>
130
                           </View>
130
                           </View>
131
 
131
 
132
 
132
 
133
                         </View>
133
                         </View>
134
 
134
 
135
-                        <View className='phone'>手机:&emsp;{item.phone}</View>
136
-                        <View className='phone'>意向楼盘:&emsp;{item.intention ? item.intention : '暂无'}</View>
135
+                        <View className='phone'>手机: {item.phone}</View>
136
+                        <View className='phone'>意向楼盘: {item.intention ? item.intention : '暂无'}</View>
137
 
137
 
138
                       </View>
138
                       </View>
139
                       <View className='time'>{dayjs(item.createDate).format('YYYY-MM-DD HH:mm:ss')}</View>
139
                       <View className='time'>{dayjs(item.createDate).format('YYYY-MM-DD HH:mm:ss')}</View>

+ 6
- 6
src/pages/card/index.js 파일 보기

25
 
25
 
26
 export default class Index extends Component {
26
 export default class Index extends Component {
27
   config = {
27
   config = {
28
-    navigationBarTitleText: '个人主页' 
28
+    navigationBarTitleText: '个人主页'
29
   }
29
   }
30
   state = {
30
   state = {
31
     cardId: null,
31
     cardId: null,
43
       const router = Taro.getStorageSync('router')
43
       const router = Taro.getStorageSync('router')
44
       const id = this.$router.params.id || router.query.id || '4604a792d575eb8187711625bd88832c'
44
       const id = this.$router.params.id || router.query.id || '4604a792d575eb8187711625bd88832c'
45
 
45
 
46
-      if(router.query.id){
46
+      if (router.query.id) {
47
         this.setState({
47
         this.setState({
48
           cardId: id,
48
           cardId: id,
49
           modalStatus: true
49
           modalStatus: true
50
         }, this.loadCardDetail)
50
         }, this.loadCardDetail)
51
-      }else{
51
+      } else {
52
         this.setState({
52
         this.setState({
53
           cardId: id,
53
           cardId: id,
54
           modalStatus: false
54
           modalStatus: false
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
 
510
                 <View className='detailed__main'>
510
                 <View className='detailed__main'>
511
                   <View className='detailed__tel' onClick={this.makePhoneCall}>
511
                   <View className='detailed__tel' onClick={this.makePhoneCall}>
512
                     <View className='detailed__tel__txt'>
512
                     <View className='detailed__tel__txt'>
513
-                      <Text className='tel__txt' space='ensp'>手机&emsp;</Text> {cardInfo.phone}
513
+                      <Text className='tel__txt' space='ensp'>手机 </Text> {cardInfo.phone}
514
                     </View>
514
                     </View>
515
                     <Text className='iconfont icon-dianhua tel__img'></Text>
515
                     <Text className='iconfont icon-dianhua tel__img'></Text>
516
                   </View>
516
                   </View>
517
                   <View className='detailed__add' onClick={this.getLocation}>
517
                   <View className='detailed__add' onClick={this.getLocation}>
518
                     <View className='detailed__add__txt'>
518
                     <View className='detailed__add__txt'>
519
-                      <Text className='add__txt' space='ensp'>地址&emsp;</Text> {cardInfo.address}
519
+                      <Text className='add__txt' space='ensp'>地址 </Text> {cardInfo.address}
520
                     </View>
520
                     </View>
521
                     <Text className='iconfont icon-daohangdizhi add__img'></Text>
521
                     <Text className='iconfont icon-daohangdizhi add__img'></Text>
522
                   </View>
522
                   </View>

+ 7
- 2
src/pages/card/index.scss 파일 보기

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;

+ 7
- 5
src/pages/person/customerAnalysis/index.js 파일 보기

60
 
60
 
61
   render() {
61
   render() {
62
     const tabList = [{ title: '客户分析' }, { title: '我的客户' }]
62
     const tabList = [{ title: '客户分析' }, { title: '我的客户' }]
63
-    const { customerNum } = this.state
63
+    const { customerNum, current } = this.state
64
     return (
64
     return (
65
-      <AtTabs className="tab-box" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
66
-        <AtTabsPane current={this.state.current} index={0} >
65
+      <AtTabs className="tab-box" current={current} tabList={tabList} onClick={this.handleClick.bind(this)}>
66
+        <AtTabsPane current={current} index={0} >
67
           <View >
67
           <View >
68
-            <Analysis></Analysis>
68
+            {
69
+              current != 1 && <Analysis></Analysis>
70
+            }
69
           </View>
71
           </View>
70
         </AtTabsPane>
72
         </AtTabsPane>
71
-        <AtTabsPane current={this.state.current} index={1}>
73
+        <AtTabsPane current={current} index={1}>
72
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
74
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
73
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
75
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
74
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>
76
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>

+ 6
- 4
src/pages/project/album/index.js 파일 보기

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
               })}

+ 85
- 75
src/pages/project/detail/index.js 파일 보기

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 (
572
   }
572
   }
573
 
573
 
574
 
574
 
575
-  renderPhotoAlbum() {
575
+  renderPhotoAlbum () {
576
     const { projectDetail: { buildingApartment } } = this.props
576
     const { projectDetail: { buildingApartment } } = this.props
577
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
577
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
578
-    const imgList = list.reduce((prev, cur) => {
579
-      prev = prev.concat(cur.buildingImgList)
580
-      return prev
581
-    }, [])
578
+    // const imgList = list.reduce((prev, cur) => {
579
+    //   prev = prev.concat(cur.buildingImgList)
580
+    //   return prev
581
+    // }, [])
582
+
582
 
583
 
583
-    const { albumCurrent } = this.state
584
 
584
 
585
 
585
 
586
 
586
 
587
     return (
587
     return (
588
 
588
 
589
 
589
 
590
-      <Block>
590
+      <Block> {console.log(list, 'list')}
591
         {list.length > 0 &&
591
         {list.length > 0 &&
592
           (
592
           (
593
             <View className='photos__type'>
593
             <View className='photos__type'>
597
 
597
 
598
                   <View className="around-tab">
598
                   <View className="around-tab">
599
                     {list.map((item, index) => {
599
                     {list.map((item, index) => {
600
-                      const { apartmentName } = item || {}
601
-                      const buildingImgList = item.buildingImgList
602
-
603
-
604
-                      return (
605
-                        <View
606
-                          style={{ marginRight: '8px' }}
607
-                        >
608
-                          {/* {`${label}(${num})`} */}
609
-                          <View>
610
-                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
611
-                            <View style={{ textAlign: 'center' }}>  {`${apartmentName}(${buildingImgList.length})`} </View>
612
-                          </View>
613
-                        </View>
614
-                      )
615
-                    })}
600
+                      const { apartmentName } = item
601
+                      const buildingImgList = item.buildingImgList 
602
+                      const buildingImgUrl = buildingImgList.length > 0 ? buildingImgList[0].url : null
603
+
604
+                      console.log(buildingImgUrl, 'buildingImgUrl')
605
+
606
+                      // if (buildingImgUrl != null) {
607
+                        return (<View>
608
+                         {buildingImgUrl != null&& (<View
609
+                            style={{ marginRight: '8px' }}
610
+                          >
611
+
612
+                            <View>
613
+                              <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
614
+                              <View style={{ textAlign: 'center', width: '218rpx', display: 'flex' }}>
615
+                                <View style={{ textAlign: 'center', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
616
+
617
+                                <View>({buildingImgList.length})</View>
618
+                              </View>
619
+                            </View>
620
+                          </View>)}</View>
621
+                        )
622
+                      // }
623
+
624
+                    })
625
+                    }
616
                   </View>
626
                   </View>
617
                 </View>
627
                 </View>
618
               </ScrollView>
628
               </ScrollView>
622
       </Block>
632
       </Block>
623
     )
633
     )
624
   }
634
   }
625
-  rendercircum() {
635
+  rendercircum () {
626
     const building = {
636
     const building = {
627
       ...this.props.projectDetail
637
       ...this.props.projectDetail
628
     }
638
     }
639
     )
649
     )
640
   }
650
   }
641
 
651
 
642
-  renderConsuler() {
652
+  renderConsuler () {
643
     const { userInfo: { person: { phone } } } = this.props
653
     const { userInfo: { person: { phone } } } = this.props
644
     const { projectDetail: { consultants = [] } } = this.props
654
     const { projectDetail: { consultants = [] } } = this.props
645
     return (
655
     return (
693
     )
703
     )
694
   }
704
   }
695
 
705
 
696
-  renderStatement() {
706
+  renderStatement () {
697
     return (
707
     return (
698
       <View className='statement'>
708
       <View className='statement'>
699
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
709
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
702
   }
712
   }
703
 
713
 
704
 
714
 
705
-  renderHelp() {
715
+  renderHelp () {
706
     const { helpList } = this.state
716
     const { helpList } = this.state
707
     return (
717
     return (
708
       <Block>
718
       <Block>
723
     )
733
     )
724
   }
734
   }
725
 
735
 
726
-  handleHelpClick(item) {
736
+  handleHelpClick (item) {
727
     Taro.navigateTo({
737
     Taro.navigateTo({
728
       url: '/pages/activity/detail/assistance?id=' + item.activityId
738
       url: '/pages/activity/detail/assistance?id=' + item.activityId
729
     })
739
     })
730
   }
740
   }
731
-  handleGroupClick(item) {
741
+  handleGroupClick (item) {
732
     Taro.navigateTo({
742
     Taro.navigateTo({
733
       url: '/pages/activity/detail/assemble?id=' + item.activityId
743
       url: '/pages/activity/detail/assemble?id=' + item.activityId
734
     })
744
     })
735
   }
745
   }
736
-  renderGroup() {
746
+  renderGroup () {
737
     const { groupList } = this.state
747
     const { groupList } = this.state
738
     return (
748
     return (
739
       <Block>
749
       <Block>
756
     )
766
     )
757
   }
767
   }
758
 
768
 
759
-  renderHouseTypeList() {
769
+  renderHouseTypeList () {
760
     const { statusOpts } = this.state
770
     const { statusOpts } = this.state
761
     const { projectDetail: { buildingApartment } } = this.props
771
     const { projectDetail: { buildingApartment } } = this.props
762
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
772
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
873
       </Block>
883
       </Block>
874
     )
884
     )
875
   }
885
   }
876
-  renderNews() {
886
+  renderNews () {
877
     const { newsList } = this.state
887
     const { newsList } = this.state
878
     return (
888
     return (
879
       <Block>
889
       <Block>
915
   }
925
   }
916
 
926
 
917
   onPlay () {
927
   onPlay () {
918
-        console.log()
928
+    console.log()
919
     this.setState({
929
     this.setState({
920
       videoPlayShow: 'none'
930
       videoPlayShow: 'none'
921
     })
931
     })
929
 
939
 
930
 
940
 
931
   renderVideo () {
941
   renderVideo () {
932
-    const {videoPlayShow}  = this.state
942
+    const { videoPlayShow } = this.state
933
     const { projectDetail } = this.props
943
     const { projectDetail } = this.props
934
     const { videoImage } = projectDetail
944
     const { videoImage } = projectDetail
935
     const imgSrc = videoImage[0].url
945
     const imgSrc = videoImage[0].url
954
           // initialTime='0'
964
           // initialTime='0'
955
           // loop={false}
965
           // loop={false}
956
           // muted={false}
966
           // muted={false}
957
-          
967
+
958
           show-mute-btn='true'
968
           show-mute-btn='true'
959
-          // onPlay={this.onPlay}
960
-          // show-center-play-btn='false'
961
-          // onPause= {this.onPause}
962
-       
969
+        // onPlay={this.onPlay}
970
+        // show-center-play-btn='false'
971
+        // onPause= {this.onPause}
972
+
963
         ></Video>
973
         ></Video>
964
         {/* <Button className='pro__banner-btn' onClick={this.plagVideo} style={{ display: videoPlayShow  }}>
974
         {/* <Button className='pro__banner-btn' onClick={this.plagVideo} style={{ display: videoPlayShow  }}>
965
           <Image src={require('@assets/play.png')} mode='scaleToFill' className='pro__banner-btn-img'></Image>
975
           <Image src={require('@assets/play.png')} mode='scaleToFill' className='pro__banner-btn-img'></Image>
968
         {/* <View className='pro__banner-voice' onClick={this.plagVideo} >
978
         {/* <View className='pro__banner-voice' onClick={this.plagVideo} >
969
           <Image src={require('@assets/voice.png')} mode='scaleToFill	' className='pro__banner-voice-img'></Image>
979
           <Image src={require('@assets/voice.png')} mode='scaleToFill	' className='pro__banner-voice-img'></Image>
970
         </View> */}
980
         </View> */}
971
-{/* 
981
+        {/* 
972
         <View className='pro__banner-extend' onClick={this.fullScreen} >
982
         <View className='pro__banner-extend' onClick={this.fullScreen} >
973
           <Image src={require('@assets/extend.png')} mode='scaleToFill	' className='pro__banner-extend-img'></Image>
983
           <Image src={require('@assets/extend.png')} mode='scaleToFill	' className='pro__banner-extend-img'></Image>
974
         </View> */}
984
         </View> */}
975
-      
985
+
976
       </View>
986
       </View>
977
     )
987
     )
978
   }
988
   }
979
 
989
 
980
-  changeCurrent(current) {
990
+  changeCurrent (current) {
981
     this.setState({
991
     this.setState({
982
       current: current + 1
992
       current: current + 1
983
     })
993
     })
984
   }
994
   }
985
 
995
 
986
-  render() {
996
+  render () {
987
     const { posterStatus, posterData, loaded, btnstate } = this.state
997
     const { posterStatus, posterData, loaded, btnstate } = this.state
988
     const { projectDetail } = this.props
998
     const { projectDetail } = this.props
989
     const { uvList = {} } = projectDetail
999
     const { uvList = {} } = projectDetail

+ 53
- 24
src/pages/project/index.js 파일 보기

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'

+ 2
- 6
src/pages/shop/index.js 파일 보기

36
     goodsBuilding: [],
36
     goodsBuilding: [],
37
     goodsList: [],
37
     goodsList: [],
38
     user: {},
38
     user: {},
39
+    current: 0,
40
+    points:0
39
   }
41
   }
40
 
42
 
41
   componentDidShow() {
43
   componentDidShow() {
245
         return;
247
         return;
246
     }
248
     }
247
   }
249
   }
248
-  state = {
249
-    current: 0,
250
-  }
251
-
252
-
253
 
250
 
254
   renderGoods() {
251
   renderGoods() {
255
     const { goods: { records = [] } } = this.props
252
     const { goods: { records = [] } } = this.props
385
             <Banner list={bannerList} onClick={this.handleBannerClick} indicatorDots={false}></Banner>
382
             <Banner list={bannerList} onClick={this.handleBannerClick} indicatorDots={false}></Banner>
386
           }
383
           }
387
 
384
 
388
-
389
           {this.renderGoods()}
385
           {this.renderGoods()}
390
         </ScrollView>
386
         </ScrollView>
391
       </View >
387
       </View >

+ 14
- 0
src/services/map.js 파일 보기

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 파일 보기

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,