Kaynağa Gözat

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

张延森 5 yıl önce
ebeveyn
işleme
5068d4f7c2

+ 2
- 2
config/dev.js Dosyayı Görüntüle

@@ -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.238:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.238: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: {}

+ 28
- 29
src/pages/card/index.js Dosyayı Görüntüle

@@ -1,15 +1,13 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2 2
 import './index.scss'
3
-
4 3
 import Notice from '@components/Notice'
5 4
 import Poster from './poster'
6 5
 import ProjectItem from '../project/item'
7 6
 import BackHomeBtn from '@components/BackHomeBtn'
8 7
 import getUserPhone from '@utils/getUserPhone'
9
-import AchievePhone from '@components/achievePhone'
10 8
 import ready from '@utils/ready'
9
+import AchievePhone from '@components/achievePhone'
11 10
 import { sceneInShare } from '@utils/tools'
12
-
13 11
 import { ROLE_CODE } from '@constants/user'
14 12
 import { addCardUv, addCardShareNum, favorCard, cancelFavorCard } from '@services/card'
15 13
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
@@ -44,7 +42,8 @@ export default class Index extends Component {
44 42
 
45 43
   componentWillMount() {
46 44
     ready.queue(() => {
47
-
45
+      // const router = Taro.getStorageSync('router')
46
+      // const id = this.$router.params.id || router.query.id || '4604a792d575eb8187711625bd88832c'
48 47
       // 分享场景需要先授权手机, 再授权头像
49 48
       const options = wx.getLaunchOptionsSync()
50 49
       if (sceneInShare(options.scene)) {
@@ -54,6 +53,7 @@ export default class Index extends Component {
54 53
           return
55 54
         }
56 55
 
56
+
57 57
         this.setState({
58 58
           grantPhoneVisible: true,
59 59
         })
@@ -62,7 +62,6 @@ export default class Index extends Component {
62 62
       this.initPageData()
63 63
     })
64 64
   }
65
-
66 65
   initPageData() {
67 66
     const router = Taro.getStorageSync('router')
68 67
     const id = this.$router.params.id || router.query.id
@@ -87,6 +86,7 @@ export default class Index extends Component {
87 86
     this.handleModalConfirm(tel || phone)
88 87
   }
89 88
 
89
+
90 90
   componentWillUnmount() {
91 91
     const { recordId } = this.state
92 92
     recordId && updatePoint(recordId)
@@ -118,6 +118,7 @@ export default class Index extends Component {
118 118
           recordId: res1.recordId
119 119
         })
120 120
         console.log('个人主页')
121
+        console.log(this.props, "this.props-=====!!")
121 122
       })
122 123
     })
123 124
   }
@@ -354,12 +355,11 @@ export default class Index extends Component {
354 355
       cardInfo: { id, projects = [] },
355 356
       userInfo: { person: { phone, tel, personType, avatarurl } }
356 357
     } = this.props
357
-
358 358
     if (personType === ROLE_CODE['CONSULTANT']) {
359 359
       return
360 360
     }
361
-
362 361
     const buildingId = projects[0]
362
+
363 363
     const realPhone = phoneNumber || phone || tel
364 364
 
365 365
     // TODO:
@@ -370,25 +370,26 @@ export default class Index extends Component {
370 370
         buildingId,
371 371
         phone: realPhone
372 372
       }
373
+      const { cardInfo, userInfo: { person } } = this.props
374
+      if (person.personId != cardInfo.id) {
375
+        reportClient(payload).then(res => {
376
+          this.hideModal()
377
+          this.setState({ bound: true })
378
+          if (res !== 'bound') {
379
+            Taro.showToast({
380
+              title: '恭喜您绑定成功'
381
+            })
382
+          }
383
+        }).catch(err => {
384
+          console.error(err)
385
+          this.setState({ bound: true })
373 386
 
374
-      reportClient(payload).then(res => {
375
-        this.hideModal()
376
-        this.setState({ bound: true })
377
-
378
-        if (res !== 'bound') {
379 387
           Taro.showToast({
380
-            title: '恭喜您绑定成功'
388
+            title: err.message || err,
389
+            icon: 'none'
381 390
           })
382
-        }
383
-      }).catch(err => {
384
-        console.error(err)
385
-        this.setState({ bound: true })
386
-
387
-        Taro.showToast({
388
-          title: err.message || err,
389
-          icon: 'none'
390 391
         })
391
-      })
392
+      }
392 393
 
393 394
     }
394 395
   }
@@ -439,7 +440,6 @@ export default class Index extends Component {
439 440
       modalStatus: false
440 441
     })
441 442
   }
442
-  
443 443
   handleAuthPhoneSuccess = (phone) => {
444 444
     const { person = {} } = this.props.userInfo || {}
445 445
     if ((person.avatarurl || '').indexOf('wx.qlogo.cn') === -1) {
@@ -453,18 +453,17 @@ export default class Index extends Component {
453 453
   }
454 454
 
455 455
   handeAuthPhoneFail = () => {
456
-    Taro.showToast({ 
456
+    Taro.showToast({
457 457
       title: '未授权手机号无法成为报备客户',
458 458
       icon: 'none'
459
-     })
459
+    })
460 460
   }
461
-
462 461
   render() {
463 462
     const { makePosterStatus, posterData, modalStatus, grantPhoneVisible } = this.state
464 463
     const { userInfo, cardInfo, projectDetail } = this.props
465 464
     const { person: { personType, personId, phone, tel } } = userInfo
466 465
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
467
-    const { buildingId } = projectDetail
466
+    const { buildingId, address } = projectDetail
468 467
 
469 468
     const visitorList = visitors ? visitors.slice(0, 5) : []
470 469
     const isSelf = personId === id
@@ -475,11 +474,11 @@ export default class Index extends Component {
475 474
     // const visibleConfirmModal = modalStatus && !isReport && !isSelf && (personType === ROLE_CODE['DRIFT'] || personType === ROLE_CODE['CUSTOMER'])
476 475
     const visibleConfirmModal = modalStatus && !isReport && !isSelf
477 476
     const showAuthPhone = grantPhoneVisible && userInfo.person.personId && !userInfo.person.phone
478
-
479 477
     return (
480 478
       <Block>
481 479
         {/* 生成海报 */}
482 480
         {makePosterStatus && (<Poster data={posterData} toggle={this.toggleVisiblePoster}></Poster>)}
481
+
483 482
         {
484 483
           showAuthPhone &&
485 484
           <AchievePhone user={userInfo.person} onCancel={this.handeAuthPhoneFail} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
@@ -592,7 +591,7 @@ export default class Index extends Component {
592 591
                   </View>
593 592
                   <View className='detailed__add' onClick={this.getLocation}>
594 593
                     <View className='detailed__add__txt'>
595
-                      <Text className='add__txt' space='emsp'>地址 </Text> {cardInfo.address}
594
+                      <Text className='add__txt' space='emsp'>地址 </Text> {address}
596 595
                     </View>
597 596
                     <Text className='iconfont icon-daohangdizhi add__img'></Text>
598 597
                   </View>

+ 1
- 1
src/pages/card/poster.js Dosyayı Görüntüle

@@ -129,7 +129,7 @@ export default class Index extends Component {
129 129
       {
130 130
         x: (data.miniAppName || '').length * 30 + 200,
131 131
         y: 755,
132
-        text: '查看主页',
132
+        text: '查看',
133 133
         fontSize: 26,
134 134
         color: '#999',
135 135
         baseLine: 'middle',

+ 24
- 15
src/pages/checkin/index.js Dosyayı Görüntüle

@@ -5,6 +5,7 @@ import { AtDivider, AtList, AtListItem, AtGrid, AtButton } from 'taro-ui'
5 5
 // import achievePhone from '@components/achievePhone'
6 6
 import { checkinDetails, checkinActive } from '@services/checkin'
7 7
 import { parseQueryString } from '@utils/tools'
8
+import { NONAME } from 'dns';
8 9
 
9 10
 export default class checkin extends Component {
10 11
 
@@ -16,22 +17,28 @@ export default class checkin extends Component {
16 17
 
17 18
   componentWillMount () {
18 19
     const router = Taro.getStorageSync('router')
19
-    console.log('router---',router)
20
-    console.log('props---',this.props)
21
-    const { id, type } = parseQueryString(router.query.params)
22
-    console.log('props---',id)
20
+    console.log('router---', parseQueryString)
21
+    console.log(router)
22
+    // const id = router.query.paramsId
23
+    // const type = router.query.type || ''
24
+
25
+    const { id = router.query.paramsId, type = router.query.type || '' } = parseQueryString(router.query.params)
26
+    console.log(id, 'id-----')
23 27
     this.setState({ id, type })
24 28
     this.getcheckinDetails(id, type)
29
+
30
+
25 31
   }
26 32
   // dynamicId
27 33
   getcheckinDetails (id, type) {
28 34
     Taro.showLoading()
29 35
 
30 36
     checkinDetails(id, type).then(res => {
37
+      console.log('data:', res)
31 38
       Taro.hideLoading()
32 39
       this.setState({
33 40
         data: res,
34
-      })      
41
+      })
35 42
     })
36 43
   }
37 44
 
@@ -43,12 +50,13 @@ export default class checkin extends Component {
43 50
 
44 51
       // TODO: 需要依据 type 跳转
45 52
       Taro.navigateTo({
46
-        url: '/pages/checkin/checkinsuccess/index?addPoints=' + res.addPoints,      
53
+        url: '/pages/checkin/checkinsuccess/index?addPoints=' + res.addPoints,
47 54
       })
48 55
 
49 56
     }).catch((err) => {
50 57
       Taro.showToast({
51
-        title: `失败: ${err.message}`
58
+        title: `失败: ${err.message}`,
59
+        icon: 'none'
52 60
       })
53 61
 
54 62
       console.error(err)
@@ -64,7 +72,8 @@ export default class checkin extends Component {
64 72
 
65 73
   render () {
66 74
     const { dynamic = {}, enlist = {}, person = {} } = this.state.data || {}
67
-
75
+    const {  activityStatus   } =  dynamic  || {}
76
+    console.log(enlist, 'enlist')
68 77
     return (
69 78
       <View className="checkin" style="width:100vw;height:100vh;" >
70 79
 
@@ -104,16 +113,16 @@ export default class checkin extends Component {
104 113
           {/* {console.log(data.person.status)} */}
105 114
         </View>}
106 115
         {enlist.enlistId == null && <View className="unregistered">
107
-        {dynamic.activityStatus === 1 && <View style="text-align: center;color:#666666">
108
-          活动未开始
116
+          {activityStatus === 1 && <View style="text-align: center;color:#666666">
117
+            活动未开始
109 118
         </View>
110 119
           }
111
-          {dynamic.activityStatus === 2 && <View style="text-align: center;color:#666666">
112
-          活动已结束
120
+          {activityStatus === 2 && <View style="text-align: center;color:#666666">
121
+            活动已结束
113 122
         </View>
114 123
           }
115 124
 
116
-          {!dynamic.activityStatus && 
125
+          {!activityStatus &&
117 126
             <View>
118 127
               <View>
119 128
                 <Image className="img1" src={require('@assets/checkin/noentry.png')} ></Image>
@@ -125,9 +134,9 @@ export default class checkin extends Component {
125 134
 
126 135
               <AtButton type='primary' className="toactivebutton" onClick={() => { this.toactivity(dynamic.dynamicId) }}>立即前往</AtButton>
127 136
             </View>
128
-          }        
137
+          }
129 138
         </View>
130
-      }
139
+        }
131 140
       </View>
132 141
 
133 142
     );

+ 52
- 15
src/pages/project/detail/poster.js Dosyayı Görüntüle

@@ -38,9 +38,44 @@ export default class Index extends Component {
38 38
     const { data } = this.props
39 39
     const { basicConfig } = this.state
40 40
     const texts = [
41
+      {
42
+        x: 180,
43
+        y: 540,
44
+        text: data.nickname,
45
+        fontSize: 29,
46
+        color: '#000',
47
+        baseLine: 'middle',
48
+        lineHeight: 48,
49
+        overFlow:'hidden',
50
+        width: 240,
51
+        zIndex: 999
52
+      },
53
+      {
54
+        x: 180,
55
+        y: 580,
56
+        text: '邀请您查看详情',
57
+        fontSize: 29,
58
+        color: '#888',
59
+        baseLine: 'middle',
60
+        lineHeight: 48,
61
+        // textAlign: 'left',
62
+        width: 260,
63
+        zIndex: 999
64
+      },
65
+      {
66
+        x: 480,
67
+        y: 540,
68
+        text: dayjs(data.createDate).format('YYYY-MM-DD') || '',
69
+        fontSize: 25,
70
+        color: '#888',
71
+        baseLine: 'middle',
72
+        lineHeight: 48,
73
+        width: 200,
74
+        zIndex: 999
75
+      },
41 76
       {
42 77
         x: 30,
43
-        y: 740,
78
+        y: 660,
44 79
         text: data.buildingName,
45 80
         fontSize: 36,
46 81
         color: 'black',
@@ -52,10 +87,10 @@ export default class Index extends Component {
52 87
         zIndex: 999
53 88
       },{
54 89
         x: 30,
55
-        y: 820,
90
+        y: 746,
56 91
         text: data.price ? '约'+data.price+'元/m²' : '待定',
57 92
         fontSize: 36,
58
-        color: 'red',
93
+        color: '#FF2744',
59 94
         baseLine: 'middle',
60 95
         lineNum: 2,
61 96
         lineHeight: 48,
@@ -65,12 +100,12 @@ export default class Index extends Component {
65 100
       },
66 101
       {
67 102
         x: 30,
68
-        y: 890,
103
+        y: 830,
69 104
         text: data.posterDescription,
70 105
         fontSize: 28,
71 106
         color: '#999',
72 107
         baseLine: 'middle',
73
-        lineNum: 1,
108
+        lineNum: 2,
74 109
         lineHeight: 48,
75 110
         // textAlign: 'center',
76 111
         width: 560,
@@ -103,14 +138,14 @@ export default class Index extends Component {
103 138
         y: 1070,
104 139
         text: data.miniAppName,
105 140
         fontSize: 34,
106
-        color: 'red',
141
+        color: '#000',
107 142
         baseLine: 'middle',
108 143
         lineHeight: 48,
109 144
         width: (data.miniAppName || '').length * 30 + 60,
110 145
         zIndex: 11
111 146
       },
112 147
       {
113
-        x: (data.miniAppName || '').length * 30 + 130,
148
+        x: (data.miniAppName || '').length * 30 + 120,
114 149
         y: 1070,
115 150
         text: '项目详情',
116 151
         fontSize: 26,
@@ -126,7 +161,7 @@ export default class Index extends Component {
126 161
       {
127 162
         url: data.poster,
128 163
         width: 640,
129
-        height: 670,
164
+        height: 512,
130 165
         y: 0,
131 166
         x: 0
132 167
       },
@@ -140,11 +175,11 @@ export default class Index extends Component {
140 175
       },
141 176
       {
142 177
         url: data.avatarurl || require('@assets/default-avatar.png'),
143
-        width: 130,
144
-        height: 130,
145
-        y: 550,
146
-        x: 20,
147
-        borderRadius: 130,
178
+        width: 120,
179
+        height: 120,
180
+        y: 452,
181
+        x: 40,
182
+        borderRadius: 120,
148 183
         zIndex: 999
149 184
       }
150 185
     ]
@@ -152,9 +187,9 @@ export default class Index extends Component {
152 187
     const blocks = [
153 188
       {
154 189
         x: 0,
155
-        y: 966,
190
+        y: 953,
156 191
         width: 640,
157
-        height: 160,
192
+        height: 186,
158 193
         backgroundColor: 'rgba(248,248,248,1)',
159 194
         zIndex: 1
160 195
       }
@@ -235,11 +270,13 @@ export default class Index extends Component {
235 270
       <Block>
236 271
         {
237 272
           this.state.canvasStatus && (
273
+            <View style="10rpx 0px 30rpx #dcdcdc">
238 274
             <TaroCanvasDrawer
239 275
               config={this.state.config}
240 276
               onCreateSuccess={this.onCreateSuccess}
241 277
               onCreateFail={this.onCreateFail}
242 278
             />
279
+            </View>
243 280
           )
244 281
         }
245 282
         {

+ 2
- 0
src/pages/project/detail/poster.scss Dosyayı Görüntüle

@@ -45,8 +45,10 @@
45 45
 
46 46
       .result-img {
47 47
         height: 60vh;
48
+        width: 406px;
48 49
         display: block;
49 50
         margin: 0 auto;
51
+        box-shadow:10px 0px 30px #dcdcdc;
50 52
       }
51 53
     }
52 54
   }

+ 3
- 3
src/pages/project/floor/index.js Dosyayı Görüntüle

@@ -35,11 +35,11 @@ export default class Index extends Component {
35 35
           </View>
36 36
           <View className='item'>
37 37
             <Text className='txt left-txt'>均价</Text>
38
-            <Text className='txt right-txt'>{projectDetail.price ? projectDetail.price :'待定'}</Text>
38
+            <Text className='txt right-txt'>{projectDetail.price ? projectDetail.price : '待定'}</Text>
39 39
           </View>
40 40
           <View className='item'>
41 41
             <Text className='txt left-txt'>销售状态</Text>
42
-            <Text className='txt right-txt'>{projectDetail.marketStatus ? projectDetail.marketStatus :'待定'}</Text>
42
+            <Text className='txt right-txt'>{projectDetail.marketStatus ? projectDetail.marketStatus : '待定'}</Text>
43 43
           </View>
44 44
           <View className='item'>
45 45
             <Text className='txt left-txt'>开盘日期</Text>
@@ -83,7 +83,7 @@ export default class Index extends Component {
83 83
           </View>
84 84
           <View className='item'>
85 85
             <Text className='txt left-txt'>项目说明</Text>
86
-            <Text className='txt right-txt'>{'暂无'}</Text>
86
+            <Text className='txt right-txt'>{projectDetail.dynamic || '暂无'}</Text>
87 87
           </View>
88 88
         </View>
89 89
       </View >