ソースを参照

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

张延森 5 年 前
コミット
da6bc41583

+ 2
- 2
config/dev.js ファイルの表示

@@ -9,8 +9,8 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 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 15
   weapp: {},
16 16
   h5: {}

+ 1
- 1
src/components/charts/Line.js ファイルの表示

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

+ 6
- 5
src/components/charts/style.scss ファイルの表示

@@ -1,9 +1,10 @@
1 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 8
   width:100vw;
8 9
   height:400px;
9 10
   display: flex;

+ 1
- 3
src/pages/activity/detail/assemble.js ファイルの表示

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

+ 0
- 8
src/pages/activity/detail/assistance.js ファイルの表示

@@ -614,14 +614,6 @@ export default class Detail extends Component {
614 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 617
                 </View>
626 618
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
627 619
                 <View style="padding:0 40rpx">

+ 14
- 15
src/pages/activity/detail/index.js ファイルの表示

@@ -280,19 +280,18 @@ export default class Detail extends Component {
280 280
     }
281 281
 
282 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 297
     savePoint({
@@ -328,7 +327,7 @@ export default class Detail extends Component {
328 327
               </View>
329 328
               <ScrollView
330 329
                 scrollY
331
-                className="detail-wrap">
330
+                className="detail-wrap" style="margin-top:-40rpx">
332 331
                 <View className="detail bottom-box">
333 332
                   {detail.isEnlist == 0 &&
334 333
                     <View className="detail-sign__num">不需要报名</View>
@@ -397,7 +396,7 @@ export default class Detail extends Component {
397 396
                     ))))
398 397
                 }
399 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 402
                 {/* {phone ? (

+ 8
- 8
src/pages/activity/detail/index.scss ファイルの表示

@@ -90,11 +90,11 @@
90 90
 }
91 91
 .detail {
92 92
   background: white;
93
-  border-top-left-radius: 28px;
94
-  border-top-right-radius: 28px;
93
+  border-radius: 28px 28px 0 0;
95 94
   padding: 30px 40px 0 40px;
96 95
   position: relative;
97 96
   overflow: hidden;
97
+  
98 98
 
99 99
   .status__img{
100 100
     width: 176px;
@@ -154,21 +154,20 @@
154 154
     top: -22px;
155 155
     right: -18px;
156 156
     width: 200px;
157
-    height: 88px;
157
+    height: 74px;
158 158
     display: flex;
159 159
     justify-content: center;
160 160
     align-items: center;
161 161
     background: rgba(255, 237, 237, 0.85);
162 162
     border-radius: 36px;
163 163
     color: #FF5757;
164
-    font-size: 28px;
165
-    padding-top: 17px;
164
+    font-size: 26px;
165
+    padding-top: 14px;
166 166
   }
167 167
 
168 168
   &-title {
169 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 173
   &-top {
@@ -180,11 +179,12 @@
180 179
 
181 180
       .row-label {
182 181
         font-size: 32px;
182
+        color:#999;
183 183
       }
184 184
 
185 185
       .row-content {
186 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 ファイルの表示

@@ -271,16 +271,14 @@ export default class Index extends Component {
271 271
       status: 1
272 272
     }
273 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 ファイルの表示

@@ -6,6 +6,7 @@ import Poster from './poster'
6 6
 import ProjectItem from '../project/item'
7 7
 import BackHomeBtn from '@components/BackHomeBtn'
8 8
 import getUserPhone from '@utils/getUserPhone'
9
+import AchievePhone from '@components/achievePhone'
9 10
 import ready from '@utils/ready'
10 11
 
11 12
 import { ROLE_CODE } from '@constants/user'
@@ -36,33 +37,46 @@ export default class Index extends Component {
36 37
     recordId: null,
37 38
     isSave: false,
38 39
     modalStatus: false,
40
+    grantPhoneVisible: false, // 授权手机弹框
39 41
   }
40 42
 
41 43
   componentWillMount() {
42 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 66
   componentWillUnmount() {
63 67
     const { recordId } = this.state
64 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 81
   loadCardDetail() {
68 82
     const { cardId } = this.state
@@ -389,7 +403,7 @@ export default class Index extends Component {
389 403
     })
390 404
   }
391 405
   render() {
392
-    const { makePosterStatus, posterData, modalStatus } = this.state
406
+    const { makePosterStatus, posterData, modalStatus, grantPhoneVisible } = this.state
393 407
     const { userInfo, cardInfo, projectDetail } = this.props
394 408
     const { person: { personType, personId, phone, tel } } = userInfo
395 409
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
@@ -407,7 +421,10 @@ export default class Index extends Component {
407 421
       <Block>
408 422
         {/* 生成海报 */}
409 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 429
           visibleConfirmModal && (
413 430
             <View className="modal">

+ 0
- 7
src/pages/person/customerAnalysis/analysis.js ファイルの表示

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

+ 3
- 3
src/pages/project/detail/Around/Pannel.js ファイルの表示

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

+ 46
- 32
src/pages/project/detail/index.js ファイルの表示

@@ -7,6 +7,7 @@ import Poster from './poster'
7 7
 import PoiAround from '@components/amap/PoiAround'
8 8
 import Around from './Around'
9 9
 import BackHomeBtn from '@components/BackHomeBtn'
10
+import AchievePhone from '@components/achievePhone'
10 11
 import {
11 12
   addItemUv,
12 13
   addItemShareNum,
@@ -57,39 +58,14 @@ export default class Index extends Component {
57 58
     btnstate: 1,// 1显示视频 0显示图片
58 59
     albumCurrent: 0,
59 60
     videoPlayShow: 'flex',
61
+    grantPhoneVisible: false, // 授权手机弹框
60 62
   }
61 63
 
62 64
   componentWillMount() {
63 65
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
64 66
 
65 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,10 +73,44 @@ export default class Index extends Component {
97 73
     const { recordId } = this.state
98 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 105
   componentDidMount() {
101 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 116
   loadHelpGroupList() {
@@ -792,7 +802,7 @@ export default class Index extends Component {
792 802
     )
793 803
   }
794 804
 
795
-  renderHouseTypeList () {
805
+  renderHouseTypeList() {
796 806
     const { statusOpts, statusBgColors } = this.state
797 807
     const { projectDetail: { buildingApartment } } = this.props
798 808
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
@@ -1025,14 +1035,18 @@ export default class Index extends Component {
1025 1035
   }
1026 1036
 
1027 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 1040
     const { uvList = {} } = projectDetail
1031 1041
     const { total = 0, records = [] } = uvList
1032 1042
     const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
1033 1043
 
1034 1044
     return (
1035 1045
       <Block>
1046
+        {
1047
+          (grantPhoneVisible && userInfo.person.personId && !userInfo.person.phone) &&
1048
+          <AchievePhone user={userInfo.person} onSuccess={this.initPageData}></AchievePhone>
1049
+        }
1036 1050
         {
1037 1051
           loaded && (
1038 1052
             <View className='detail'>