Browse Source

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

张延森 5 years ago
parent
commit
da6bc41583

+ 2
- 2
config/dev.js View File

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.172:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.172:8080"',
12
+    // HOST: '"http://192.168.0.84:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.84:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 1
- 1
src/components/charts/Line.js View File

165
     // this.refreshChart(this.props.source)
165
     // this.refreshChart(this.props.source)
166
 
166
 
167
     return (
167
     return (
168
-      <View style="width:100vw;height:530rpx;position: relative;">
168
+      <View style="width:100vw;height:500rpx;position: relative;">
169
         <View className="map-container">
169
         <View className="map-container">
170
           <ec-canvas ref={this.handleEcComponent} ec={this.state.ec}></ec-canvas>
170
           <ec-canvas ref={this.handleEcComponent} ec={this.state.ec}></ec-canvas>
171
         </View>
171
         </View>

+ 6
- 5
src/components/charts/style.scss View File

1
 .map-container {
1
 .map-container {
2
-  position: absolute;
3
-  top: 80px;
4
-  bottom: 0;
5
-  left: 0;
6
-  right: 0;
2
+  // position: absolute;
3
+  // top: 80px;
4
+  // bottom: 0;
5
+  // left: 0;
6
+  // right: 0;
7
+  margin-top: 60px;
7
   width:100vw;
8
   width:100vw;
8
   height:400px;
9
   height:400px;
9
   display: flex;
10
   display: flex;

+ 1
- 3
src/pages/activity/detail/assemble.js View File

402
               phone: person.tel || person.phone,
402
               phone: person.tel || person.phone,
403
               avatarurl: person.avatarurl,
403
               avatarurl: person.avatarurl,
404
             }).then(res => {
404
             }).then(res => {
405
-              console.log(res,'888888')
406
-              if(res){
407
                 this.setState({
405
                 this.setState({
408
                   recordDetail: res.taShareRecord,
406
                   recordDetail: res.taShareRecord,
409
                   recordId: res.taShareRecord.recordId,
407
                   recordId: res.taShareRecord.recordId,
411
                   isStarter: true,
409
                   isStarter: true,
412
                   groupState: res.taShareRecord.status,
410
                   groupState: res.taShareRecord.status,
413
                 }, () => cb && cb())
411
                 }, () => cb && cb())
414
-              }
412
+              
415
             }).catch(err => {
413
             }).catch(err => {
416
               console.log(err,'11111111111111')
414
               console.log(err,'11111111111111')
417
               Taro.showToast({
415
               Taro.showToast({

+ 0
- 8
src/pages/activity/detail/assistance.js View File

614
                       </View>
614
                       </View>
615
                     )
615
                     )
616
                   }
616
                   }
617
-                  <View className="btn-box" style="padding:25px 0;">
618
-
619
-                    <View className="set-btn" style="border:none">
620
-                      <FormIdCollector>
621
-                        <Button className= "set-btn" onClick={this.startMine}>发起我的助力</Button>
622
-                      </FormIdCollector>
623
-                    </View>
624
-                  </View>
625
                 </View>
617
                 </View>
626
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
618
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
627
                 <View style="padding:0 40rpx">
619
                 <View style="padding:0 40rpx">

+ 14
- 15
src/pages/activity/detail/index.js View File

280
     }
280
     }
281
 
281
 
282
     signupActivity(payload).then(res => {
282
     signupActivity(payload).then(res => {
283
-      if (res) {
284
-        Taro.showToast({
285
-          title: '报名成功'
286
-        })
287
-        this.setState({
288
-          isSign: true,
289
-          canChoose: 'none'
290
-        })
291
-      }else{
292
-        this.setState({
293
-          canChoose: 'none'
294
-        })
295
-      }
283
+
284
+      Taro.showToast({
285
+        title: '报名成功'
286
+      })
287
+      this.setState({
288
+        isSign: true,
289
+        canChoose: 'none'
290
+      })
291
+      setTimeout(() => {
292
+        this.loadDetail()
293
+      }, 500)
294
+
296
     })
295
     })
297
 
296
 
298
     savePoint({
297
     savePoint({
328
               </View>
327
               </View>
329
               <ScrollView
328
               <ScrollView
330
                 scrollY
329
                 scrollY
331
-                className="detail-wrap">
330
+                className="detail-wrap" style="margin-top:-40rpx">
332
                 <View className="detail bottom-box">
331
                 <View className="detail bottom-box">
333
                   {detail.isEnlist == 0 &&
332
                   {detail.isEnlist == 0 &&
334
                     <View className="detail-sign__num">不需要报名</View>
333
                     <View className="detail-sign__num">不需要报名</View>
397
                     ))))
396
                     ))))
398
                 }
397
                 }
399
                 {detail.activityStatus == 2 &&
398
                 {detail.activityStatus == 2 &&
400
-                  <Button disabled='true' className='submit-btn hasSigned' >立即报名</Button>
399
+                  <Button disabled='true' className='submit-btn hasSigned' >{isSign ? '已报名' : '立即报名'}</Button>
401
                 }
400
                 }
402
 
401
 
403
                 {/* {phone ? (
402
                 {/* {phone ? (

+ 8
- 8
src/pages/activity/detail/index.scss View File

90
 }
90
 }
91
 .detail {
91
 .detail {
92
   background: white;
92
   background: white;
93
-  border-top-left-radius: 28px;
94
-  border-top-right-radius: 28px;
93
+  border-radius: 28px 28px 0 0;
95
   padding: 30px 40px 0 40px;
94
   padding: 30px 40px 0 40px;
96
   position: relative;
95
   position: relative;
97
   overflow: hidden;
96
   overflow: hidden;
97
+  
98
 
98
 
99
   .status__img{
99
   .status__img{
100
     width: 176px;
100
     width: 176px;
154
     top: -22px;
154
     top: -22px;
155
     right: -18px;
155
     right: -18px;
156
     width: 200px;
156
     width: 200px;
157
-    height: 88px;
157
+    height: 74px;
158
     display: flex;
158
     display: flex;
159
     justify-content: center;
159
     justify-content: center;
160
     align-items: center;
160
     align-items: center;
161
     background: rgba(255, 237, 237, 0.85);
161
     background: rgba(255, 237, 237, 0.85);
162
     border-radius: 36px;
162
     border-radius: 36px;
163
     color: #FF5757;
163
     color: #FF5757;
164
-    font-size: 28px;
165
-    padding-top: 17px;
164
+    font-size: 26px;
165
+    padding-top: 14px;
166
   }
166
   }
167
 
167
 
168
   &-title {
168
   &-title {
169
     font-size: $font-size-title-large;
169
     font-size: $font-size-title-large;
170
-    line-height: 1.5;
171
-    margin-bottom: 20px;
170
+    margin-top: 20px;
172
   }
171
   }
173
 
172
 
174
   &-top {
173
   &-top {
180
 
179
 
181
       .row-label {
180
       .row-label {
182
         font-size: 32px;
181
         font-size: 32px;
182
+        color:#999;
183
       }
183
       }
184
 
184
 
185
       .row-content {
185
       .row-content {
186
         padding-left: 10px;
186
         padding-left: 10px;
187
-        color: $text-color-lighter;
187
+        color: #333;
188
       }
188
       }
189
     }
189
     }
190
   }
190
   }

+ 7
- 9
src/pages/agent/recommend/index.js View File

271
       status: 1
271
       status: 1
272
     }
272
     }
273
     recommendClient(param).then(res => {
273
     recommendClient(param).then(res => {
274
-      if (res) {
275
-        Taro.showToast({
276
-          title: '提交成功'
277
-        })
278
-        setTimeout(() => {
279
-          Taro.navigateTo({ url: '/pages/agent/client/index' })//测试用
280
-        }, 700)
281
-        this.clearInputEvent()
282
-      }
283
 
274
 
275
+      Taro.showToast({
276
+        title: '提交成功'
277
+      })
278
+      setTimeout(() => {
279
+        Taro.navigateTo({ url: '/pages/agent/client/index' })//测试用
280
+      }, 700)
281
+      this.clearInputEvent()
284
     })
282
     })
285
   }
283
   }
286
   // 性别
284
   // 性别

+ 35
- 18
src/pages/card/index.js View File

6
 import ProjectItem from '../project/item'
6
 import ProjectItem from '../project/item'
7
 import BackHomeBtn from '@components/BackHomeBtn'
7
 import BackHomeBtn from '@components/BackHomeBtn'
8
 import getUserPhone from '@utils/getUserPhone'
8
 import getUserPhone from '@utils/getUserPhone'
9
+import AchievePhone from '@components/achievePhone'
9
 import ready from '@utils/ready'
10
 import ready from '@utils/ready'
10
 
11
 
11
 import { ROLE_CODE } from '@constants/user'
12
 import { ROLE_CODE } from '@constants/user'
36
     recordId: null,
37
     recordId: null,
37
     isSave: false,
38
     isSave: false,
38
     modalStatus: false,
39
     modalStatus: false,
40
+    grantPhoneVisible: false, // 授权手机弹框
39
   }
41
   }
40
 
42
 
41
   componentWillMount() {
43
   componentWillMount() {
42
     ready.queue(() => {
44
     ready.queue(() => {
43
-      const router = Taro.getStorageSync('router')
44
-      const id = this.$router.params.id || router.query.id || '4604a792d575eb8187711625bd88832c'
45
-
46
-      if (router.query.id) {
47
-        this.setState({
48
-          cardId: id,
49
-          modalStatus: true
50
-        }, this.loadCardDetail)
51
-      } else {
52
-        this.setState({
53
-          cardId: id,
54
-          modalStatus: false
55
-        }, this.loadCardDetail)
56
-      }
57
-
58
-      addCardUv(id)
45
+      this.initPageData()
59
     })
46
     })
60
   }
47
   }
48
+  initPageData() {
49
+    const router = Taro.getStorageSync('router')
50
+    const id = this.$router.params.id || router.query.id || '4604a792d575eb8187711625bd88832c'
51
+
52
+    if (router.query.id) {
53
+      this.setState({
54
+        cardId: id,
55
+        modalStatus: true
56
+      }, this.loadCardDetail)
57
+    } else {
58
+      this.setState({
59
+        cardId: id,
60
+        modalStatus: false
61
+      }, this.loadCardDetail)
62
+    }
61
 
63
 
64
+    addCardUv(id)
65
+  }
62
   componentWillUnmount() {
66
   componentWillUnmount() {
63
     const { recordId } = this.state
67
     const { recordId } = this.state
64
     recordId && updatePoint(recordId)
68
     recordId && updatePoint(recordId)
65
   }
69
   }
70
+  componentDidMount() {
71
+    const options = wx.getLaunchOptionsSync()
72
+    const sceneList = [ 1011, 1012, 1013, 1031, 1032, 1036, 1047, 1048]
73
+
74
+    if (sceneList.indexOf(options.scene) != -1) {
75
+      this.setState({
76
+        grantPhoneVisible: true,
77
+      })
78
+    }
79
+  }
66
 
80
 
67
   loadCardDetail() {
81
   loadCardDetail() {
68
     const { cardId } = this.state
82
     const { cardId } = this.state
389
     })
403
     })
390
   }
404
   }
391
   render() {
405
   render() {
392
-    const { makePosterStatus, posterData, modalStatus } = this.state
406
+    const { makePosterStatus, posterData, modalStatus, grantPhoneVisible } = this.state
393
     const { userInfo, cardInfo, projectDetail } = this.props
407
     const { userInfo, cardInfo, projectDetail } = this.props
394
     const { person: { personType, personId, phone, tel } } = userInfo
408
     const { person: { personType, personId, phone, tel } } = userInfo
395
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
409
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
407
       <Block>
421
       <Block>
408
         {/* 生成海报 */}
422
         {/* 生成海报 */}
409
         {makePosterStatus && (<Poster data={posterData} toggle={this.toggleVisiblePoster}></Poster>)}
423
         {makePosterStatus && (<Poster data={posterData} toggle={this.toggleVisiblePoster}></Poster>)}
410
-
424
+        {
425
+          (grantPhoneVisible && userInfo.person.personId && !userInfo.person.phone) &&
426
+          <AchievePhone user={userInfo.person} onSuccess={this.initPageData}></AchievePhone>
427
+        }
411
         {
428
         {
412
           visibleConfirmModal && (
429
           visibleConfirmModal && (
413
             <View className="modal">
430
             <View className="modal">

+ 0
- 7
src/pages/person/customerAnalysis/analysis.js View File

179
               </View>
179
               </View>
180
               {
180
               {
181
                 chartInfo.length &&
181
                 chartInfo.length &&
182
-
183
                 <LineChart source={chartInfo} />
182
                 <LineChart source={chartInfo} />
184
-
185
               }
183
               }
186
               {
184
               {
187
                 !chartInfo.length &&
185
                 !chartInfo.length &&
192
                 </View>
190
                 </View>
193
                 </View>
191
                 </View>
194
               }
192
               }
195
-
196
               {
193
               {
197
                 sexInfo.length &&
194
                 sexInfo.length &&
198
                 <View>
195
                 <View>
206
                   </View>
203
                   </View>
207
                 </View>
204
                 </View>
208
               }
205
               }
209
-
210
             </View>
206
             </View>
211
           </AtTabsPane>
207
           </AtTabsPane>
212
           <AtTabsPane current={current} index={1}>
208
           <AtTabsPane current={current} index={1}>
222
                 </View>
218
                 </View>
223
               </View>
219
               </View>
224
               {chartInfo2.length &&
220
               {chartInfo2.length &&
225
-
226
                 <LineChart source={chartInfo2} />
221
                 <LineChart source={chartInfo2} />
227
-
228
               }
222
               }
229
               {
223
               {
230
                 !chartInfo2.length &&
224
                 !chartInfo2.length &&
235
                 </View>
229
                 </View>
236
                 </View>
230
                 </View>
237
               }
231
               }
238
-
239
               {
232
               {
240
                 sexInfo.length &&
233
                 sexInfo.length &&
241
                 <View>
234
                 <View>

+ 3
- 3
src/pages/project/detail/Around/Pannel.js View File

41
     let currentMarkerPos = undefined
41
     let currentMarkerPos = undefined
42
 
42
 
43
     if (props.active !== undefined && props.active != (this.state.currentMarker || {}).id) {
43
     if (props.active !== undefined && props.active != (this.state.currentMarker || {}).id) {
44
-      for (let i = 0; i < markerList.length; i ++) {
44
+      for (let i = 0; i < markerList.length; i++) {
45
         if (markerList[i].id === props.active) {
45
         if (markerList[i].id === props.active) {
46
           activeIndex = i;
46
           activeIndex = i;
47
           break;
47
           break;
73
     console.log(e)
73
     console.log(e)
74
   }
74
   }
75
 
75
 
76
-  render () {  
76
+  render() {
77
     const { manualData = [] } = this.props.dataset || {}
77
     const { manualData = [] } = this.props.dataset || {}
78
     const activeKey = this.props.active
78
     const activeKey = this.props.active
79
 
79
 
87
               const { id, name, distance } = item || {}
87
               const { id, name, distance } = item || {}
88
               const dist = distance >= 1000 ? `${Number(distance / 1000).toFixed(1)}km` : `${distance}m`
88
               const dist = distance >= 1000 ? `${Number(distance / 1000).toFixed(1)}km` : `${distance}m`
89
               const active = activeKey === id
89
               const active = activeKey === id
90
-  
90
+
91
               return (
91
               return (
92
                 <View className={`around-cell ${active ? 'active' : ''}`} key={`auto-${id}`} id={id} onClick={this.setCurrent(item)}>
92
                 <View className={`around-cell ${active ? 'active' : ''}`} key={`auto-${id}`} id={id} onClick={this.setCurrent(item)}>
93
                   <View className="around-cell__body">{`${index + 1}、${name}`}</View>
93
                   <View className="around-cell__body">{`${index + 1}、${name}`}</View>

+ 46
- 32
src/pages/project/detail/index.js View File

7
 import PoiAround from '@components/amap/PoiAround'
7
 import PoiAround from '@components/amap/PoiAround'
8
 import Around from './Around'
8
 import Around from './Around'
9
 import BackHomeBtn from '@components/BackHomeBtn'
9
 import BackHomeBtn from '@components/BackHomeBtn'
10
+import AchievePhone from '@components/achievePhone'
10
 import {
11
 import {
11
   addItemUv,
12
   addItemUv,
12
   addItemShareNum,
13
   addItemShareNum,
57
     btnstate: 1,// 1显示视频 0显示图片
58
     btnstate: 1,// 1显示视频 0显示图片
58
     albumCurrent: 0,
59
     albumCurrent: 0,
59
     videoPlayShow: 'flex',
60
     videoPlayShow: 'flex',
61
+    grantPhoneVisible: false, // 授权手机弹框
60
   }
62
   }
61
 
63
 
62
   componentWillMount() {
64
   componentWillMount() {
63
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
65
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
64
 
66
 
65
     ready.queue(() => {
67
     ready.queue(() => {
66
-      const router = Taro.getStorageSync('router')
67
-      const id = this.$router.params.id || router.query.id
68
-      // const id='82b54f4a1f5b981df572253792afbfa1' 
69
-      this.setState({
70
-        buildingId: id
71
-      }, () => {
72
-        this.loadDetail()
73
-        this.loadNewsData()
74
-        this.loadActivityData()
75
-        this.loadHelpGroupList()
76
-
77
-        addItemUv(id)
78
-        // 埋点
79
-        savePoint({
80
-          event: 'detail',
81
-          eventType: 'building',
82
-          propertyName: '项目详情',
83
-          targetId: id,
84
-          buildingId: id,
85
-          data: '{}'
86
-        }).then(res => {
87
-          this.setState({
88
-            recordId: res.recordId
89
-          })
90
-          console.log('项目详情')
91
-        })
92
-      })
68
+      this.initPageData()
93
     })
69
     })
94
   }
70
   }
95
 
71
 
97
     const { recordId } = this.state
73
     const { recordId } = this.state
98
     recordId && updatePoint(recordId)
74
     recordId && updatePoint(recordId)
99
   }
75
   }
76
+  initPageData() {
77
+    const router = Taro.getStorageSync('router')
78
+    const id = this.$router.params.id || router.query.id
79
+    // const id='82b54f4a1f5b981df572253792afbfa1' 
80
+    this.setState({
81
+      buildingId: id
82
+    }, () => {
83
+      this.loadDetail()
84
+      this.loadNewsData()
85
+      this.loadActivityData()
86
+      this.loadHelpGroupList()
87
+
88
+      addItemUv(id)
89
+      // 埋点
90
+      savePoint({
91
+        event: 'detail',
92
+        eventType: 'building',
93
+        propertyName: '项目详情',
94
+        targetId: id,
95
+        buildingId: id,
96
+        data: '{}'
97
+      }).then(res => {
98
+        this.setState({
99
+          recordId: res.recordId
100
+        })
101
+        console.log('项目详情')
102
+      })
103
+    })
104
+  }
100
   componentDidMount() {
105
   componentDidMount() {
101
     const options = wx.getLaunchOptionsSync()
106
     const options = wx.getLaunchOptionsSync()
102
-    console.log(options, "-------------options---------")
103
-    // if()
107
+    const sceneList = [1011, 1012, 1013, 1031, 1032, 1036, 1047, 1048]
108
+
109
+    if (sceneList.indexOf(options.scene) != -1) {
110
+      this.setState({
111
+        grantPhoneVisible: true,
112
+      })
113
+    }
104
   }
114
   }
105
 
115
 
106
   loadHelpGroupList() {
116
   loadHelpGroupList() {
792
     )
802
     )
793
   }
803
   }
794
 
804
 
795
-  renderHouseTypeList () {
805
+  renderHouseTypeList() {
796
     const { statusOpts, statusBgColors } = this.state
806
     const { statusOpts, statusBgColors } = this.state
797
     const { projectDetail: { buildingApartment } } = this.props
807
     const { projectDetail: { buildingApartment } } = this.props
798
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
808
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
1025
   }
1035
   }
1026
 
1036
 
1027
   render() {
1037
   render() {
1028
-    const { posterStatus, posterData, loaded, btnstate } = this.state
1029
-    const { projectDetail } = this.props
1038
+    const { posterStatus, posterData, loaded, btnstate, grantPhoneVisible } = this.state
1039
+    const { projectDetail, userInfo } = this.props
1030
     const { uvList = {} } = projectDetail
1040
     const { uvList = {} } = projectDetail
1031
     const { total = 0, records = [] } = uvList
1041
     const { total = 0, records = [] } = uvList
1032
     const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
1042
     const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
1033
 
1043
 
1034
     return (
1044
     return (
1035
       <Block>
1045
       <Block>
1046
+        {
1047
+          (grantPhoneVisible && userInfo.person.personId && !userInfo.person.phone) &&
1048
+          <AchievePhone user={userInfo.person} onSuccess={this.initPageData}></AchievePhone>
1049
+        }
1036
         {
1050
         {
1037
           loaded && (
1051
           loaded && (
1038
             <View className='detail'>
1052
             <View className='detail'>