1002884655 пре 4 година
родитељ
комит
db0dc2e76c

+ 39
- 11
src/pages/activity/detail/index.js Прегледај датотеку

@@ -60,7 +60,7 @@ export default class Detail extends Component {
60 60
     queryInfo: {}
61 61
   }
62 62
 
63
-  componentWillMount() {
63
+  componentWillMount () {
64 64
     ready.queue(() => {
65 65
       if (this.toggleGrantPhone()) {
66 66
         console.log("eeeeeeeeeeeeeeeeeeeeeeeeee")
@@ -95,7 +95,7 @@ export default class Detail extends Component {
95 95
       }
96 96
     })
97 97
   }
98
-  componentWillUnmount() {
98
+  componentWillUnmount () {
99 99
     const { recordId } = this.state
100 100
     recordId && updatePoint(recordId)
101 101
 
@@ -105,7 +105,7 @@ export default class Detail extends Component {
105 105
   //   this.reportClientFn()
106 106
   // }
107 107
 
108
-  loadDetail() {
108
+  loadDetail () {
109 109
     const { id, qrcodeParams, queryInfo } = this.state
110 110
     Taro.showLoading()
111 111
     // const consultant = Taro.getStorageSync('consultantId') || ''
@@ -212,7 +212,7 @@ export default class Detail extends Component {
212 212
   }
213 213
 
214 214
 
215
-  handleSignup() {
215
+  handleSignup () {
216 216
     const { detail: { buildingId, dynamicId }, isSign } = this.state
217 217
     const { userInfo: { person: { phone, name, nickname } } } = this.props
218 218
 
@@ -229,7 +229,7 @@ export default class Detail extends Component {
229 229
     })
230 230
   }
231 231
 
232
-  handleFavor() {
232
+  handleFavor () {
233 233
     const { detail: { dynamicId }, isSaved } = this.state
234 234
     if (isSaved) {
235 235
       cancelFavorActivity(dynamicId).then(res => {
@@ -261,7 +261,7 @@ export default class Detail extends Component {
261 261
     })
262 262
   }
263 263
 
264
-  handleGetPhone(e) {
264
+  handleGetPhone (e) {
265 265
     const { detail: { buildingId } } = this.state
266 266
     getUserPhone(e, { buildingId: buildingId || '' }, (phoneNumber) => {
267 267
       if (phoneNumber) {
@@ -355,7 +355,7 @@ export default class Detail extends Component {
355 355
     // })
356 356
   }
357 357
 
358
-  handleMoreClick() {
358
+  handleMoreClick () {
359 359
     // App.zhuge.track('查看置业顾问列表')
360 360
     console.log()
361 361
     Taro.navigateTo({
@@ -422,7 +422,7 @@ export default class Detail extends Component {
422 422
     })
423 423
   }
424 424
 
425
-  hideModal() {
425
+  hideModal () {
426 426
     this.setState({
427 427
       canChoose: 'none'
428 428
     })
@@ -454,7 +454,7 @@ export default class Detail extends Component {
454 454
     return true
455 455
   }
456 456
 
457
-  render() {
457
+  render () {
458 458
     const { detail, loaded, isSaved, isSign, posterVisible, posterData, queryInfo, posterShow, consultData, consultShow, grantPhoneVisible, grantAvatarVisible } = this.state
459 459
     const { userInfo = {} } = this.props
460 460
     const { person: { phone, personId, nickname, name, tel } = {} } = userInfo
@@ -534,8 +534,36 @@ export default class Detail extends Component {
534 534
               {
535 535
                 consultShow && <Consultant style="bottom:140rpx" personId={personId} name={name || nickname} data={consultData}></Consultant>
536 536
               }
537
-              <View className="bot-nav flex">
537
+              <View className="NewBottom flex-h">
538 538
                 {
539
+                  posterShow && (
540
+                    <Button className='Btn' onClick={() => { this.togglePosterStatus(true) }}>
541
+                      <Image mode="heightFix" src={require('@/assets/tupian_3@3x.png')}></Image>
542
+                      <Text>海报</Text>
543
+                    </Button>
544
+                  )
545
+                }
546
+                <Button className="Btn" open-type="share">
547
+                  <Image mode="heightFix" src={require('@/assets/fasong@3x.png')} className="btn-icon"></Image>
548
+                  <Text className="txt">分享</Text>
549
+                </Button>
550
+
551
+                <Button className="Btn" onClick={this.handleFavor}>
552
+                  <Text className={`iconfont ${isSaved ? 'icon-shoucang selected' : 'icon-shoucang1'}`} style={{fontSize: `20px`}}></Text>
553
+                  <Text className="txt">收藏</Text>
554
+                </Button>
555
+                <View className='flex-item'></View>
556
+                {
557
+                  parseInt(detail.isEnlist) != 0 && detail.activityStatus != 2 && (parseInt(detail.isEnlist) == 2 ? (<Button disabled='true' className='submit-btn hasSigned'>报名人数已满</Button>) : ((phone ? (
558
+                    <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
559
+                  ) : (
560
+                      <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
561
+                    ))))
562
+                }
563
+                {detail.activityStatus == 2 &&
564
+                  <Button disabled='true' className={`submit-btn ${isSign ? 'hasSigned' : ''}`}>{isSign ? '已报名' : '立即报名'}</Button>
565
+                }
566
+                {/* {
539 567
                   posterShow && (
540 568
                     <Button className='btn poster-btn' onClick={() => { this.togglePosterStatus(true) }}>
541 569
                       <Image mode="aspectFill" src={require('@/assets/tupian_3@3x.png')} className="btn-icon"></Image>
@@ -561,7 +589,7 @@ export default class Detail extends Component {
561 589
                 }
562 590
                 {detail.activityStatus == 2 &&
563 591
                   <Button disabled='true' className='submit-btn hasSigned' >{isSign ? '已报名' : '立即报名'}</Button>
564
-                }
592
+                } */}
565 593
 
566 594
                 {/* {phone ? (
567 595
                   <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>

+ 48
- 3
src/pages/activity/detail/index.scss Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 @import "@/styles/theme.scss";
2
+@import "@/styles/reset.scss";
2 3
 
3 4
 // .wxParse-img {
4 5
 //   width: 100% !important;
@@ -163,7 +164,7 @@
163 164
     }
164 165
     .my-number {
165 166
       font-size: 28px;
166
-      color: #FDAC2E;
167
+      color: #fdac2e;
167 168
       display: inline-block;
168 169
       vertical-align: middle;
169 170
     }
@@ -226,12 +227,11 @@
226 227
   position: fixed;
227 228
   bottom: 0;
228 229
   width: 100%;
229
-  height: 120px;
230 230
   background: white;
231 231
   @extend .flex;
232 232
   justify-content: space-between;
233 233
   box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.2);
234
-  padding: 0 30px;
234
+  padding: 20px 30px;
235 235
 
236 236
   .btn {
237 237
     display: flex;
@@ -560,3 +560,48 @@
560 560
   background-color: #fff;
561 561
   border-top: 1px solid #eee;
562 562
 }
563
+
564
+.NewBottom {
565
+  align-items: center;
566
+  position: fixed;
567
+  bottom: 0;
568
+  left: 0;
569
+  width: 100%;
570
+  overflow: hidden;
571
+  padding: 20px 0;
572
+  background: #fff;
573
+  > button {
574
+    font-size: 0;
575
+    white-space: nowrap;
576
+    margin-left: 20px;
577
+    position: relative;
578
+    overflow: hidden;
579
+    text-align: center;
580
+    background: transparent;
581
+    > image {
582
+      height: 46px;
583
+      width: auto;
584
+      display: inline-block;
585
+    }
586
+    > text {
587
+      font-size: 28px;
588
+      line-height: 40px;
589
+      display: block;
590
+      text-align: center;
591
+      color: #333;
592
+    }
593
+    &.submit-btn {
594
+      font-size: 28px;
595
+      line-height: 80px;
596
+      width: 300px;
597
+      color: #fff;
598
+      background: #1bc5d4;
599
+      border-radius: 8px;
600
+      text-align: center;
601
+      margin-right: 30px;
602
+      &.hasSigned {
603
+        background: #ccc;
604
+      }
605
+    }
606
+  }
607
+}

+ 2
- 2
src/pages/project/detail/index.js Прегледај датотеку

@@ -365,7 +365,7 @@ export default class Index extends Component {
365 365
       }, () => {
366 366
         if (res.posters && res.posters.length) {
367 367
           this.setState({
368
-            posterShow: 'flex'
368
+            posterShow: 'inline-block'
369 369
           })
370 370
         }
371 371
         if (connectId && extendContentList.indexOf(connectId) == -1) {
@@ -845,7 +845,7 @@ export default class Index extends Component {
845 845
             <Image src={require('@/assets/img/icon11.png')} className='poster-img'></Image>
846 846
             <Text className="text">海报</Text>
847 847
           </View>
848
-          <View class='bt-nav__item' open-type="share" style={{marginLeft: posterShow !== 'none' ? `0` : `15px`}}>
848
+          <View class='bt-nav__item' open-type="share" style={{marginLeft: posterShow === 'none' ? `15px` : `15px`}}>
849 849
             <Image src={require('@/assets/img/icon10.png')} className='fenxiang-img'></Image>
850 850
             <Text className="text">分享</Text>
851 851
           </View>

+ 1
- 4
src/pages/project/detail/index.scss Прегледај датотеку

@@ -17,9 +17,6 @@
17 17
     display: inline-block;
18 18
     vertical-align: middle;
19 19
     margin-left: 20px;
20
-    &:first-child {
21
-      margin-left: 0;
22
-    }
23 20
     .kehutuijian-img {
24 21
       width: 40px;
25 22
       height: 40px;
@@ -290,7 +287,7 @@
290 287
   display: flex;
291 288
   align-items: center;
292 289
   justify-content: space-between;
293
-  padding: 10px 0;
290
+  padding: 20px 0;
294 291
 
295 292
   &__item {
296 293
     margin: 0;