许静 5 jaren geleden
bovenliggende
commit
faa9e6b064
3 gewijzigde bestanden met toevoegingen van 44 en 29 verwijderingen
  1. 27
    26
      src/pages/activity/detail/assemble.js
  2. 7
    3
      src/pages/activity/detail/index.js
  3. 10
    0
      src/pages/activity/detail/index.scss

+ 27
- 26
src/pages/activity/detail/assemble.js Bestand weergeven

@@ -85,7 +85,7 @@ export default class Detail extends Component {
85 85
   componentDidShow() {
86 86
     this.startTicker()
87 87
   }
88
-  
88
+
89 89
   componentDidHide() {
90 90
     this.stopTicker()
91 91
   }
@@ -243,7 +243,7 @@ export default class Detail extends Component {
243 243
       if (actState != ActFinished) {
244 244
         ltTicker = this.getLeftTimeTicker(res.taShareActivity.startTime, res.taShareActivity.endTime)
245 245
       }
246
-debugger
246
+      debugger
247 247
       Taro.hideLoading()
248 248
       this.setState({
249 249
         detail: res.taShareActivity,
@@ -448,7 +448,7 @@ debugger
448 448
       this.togglePosterVisible()
449 449
     })
450 450
   }
451
-  
451
+
452 452
   transTPLs2Configs(tpls, params) {
453 453
     return tpls.map((tpl) => {
454 454
       const conf = getCanvasConfig(tpl.configs, params)
@@ -504,7 +504,7 @@ debugger
504 504
     return (
505 505
       <Block>
506 506
         {/* 生成海报 */}
507
-        { posterVisible && !ltTicker.processing &&
507
+        {posterVisible && !ltTicker.processing &&
508 508
           (
509 509
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
510 510
           )
@@ -602,32 +602,33 @@ debugger
602 602
                 </View>
603 603
 
604 604
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
605
-                <View style="padding:0 40rpx">
606
-                  <Image src={detail.descImg} mode="widthFix" style="width:100%;margin-bottom:20px"></Image>
605
+                <View style="padding:0 40rpx 180rpx 40rpx">
606
+                  <Image src={detail.descImg} mode="widthFix" style="width:100%;"></Image>
607 607
                 </View>
608
+                <View className="btn-fixed">
609
+                  {
610
+                    actState === ActBeforeStart &&
611
+                    (<Button className="nostart-btn" style="margin:30px auto">未开始</Button>)
612
+                  }
613
+                  {
614
+                    isStarter && actState === ActInProcess && groupState === GroupInProcess &&
615
+                    (<Button className="assistance-btn" style="margin:30px auto" onClick={this.groupBuyInvite}>邀请好友拼团</Button>)
616
+                  }
617
+                  {
618
+                    !isStarter && actState === ActInProcess && groupState != GroupInProcess &&
608 619
 
609
-                {
610
-                  actState === ActBeforeStart &&
611
-                  (<Button className="nostart-btn" style="margin:30px auto">未开始</Button>)
612
-                }
613
-                {
614
-                  isStarter && actState === ActInProcess && groupState === GroupInProcess &&
615
-                  (<Button className="assistance-btn" style="margin:30px auto" onClick={this.groupBuyInvite}>邀请好友拼团</Button>)
616
-                }
617
-                {
618
-                  !isStarter && actState === ActInProcess && groupState != GroupInProcess &&
619
-
620
-                  <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
621
-                }
622
-                {
623
-                  !isStarter && actState === ActInProcess && groupState === GroupInProcess &&
624
-
625
-                  <View className="btn-box">
626
-                    <Button className="assistance-btn" onClick={this.joinGroup}>立即参团</Button>
627 620
                     <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
628
-                  </View>
621
+                  }
622
+                  {
623
+                    !isStarter && actState === ActInProcess && groupState === GroupInProcess &&
629 624
 
630
-                }
625
+                    <View className="btn-box">
626
+                      <Button className="assistance-btn" onClick={this.joinGroup}>立即参团</Button>
627
+                      <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
628
+                    </View>
629
+
630
+                  }
631
+                </View>
631 632
               </ScrollView>
632 633
 
633 634
               <action-sheet hidden={!actionSheetVisible} bindchange={this.toggleActionVisible}>

+ 7
- 3
src/pages/activity/detail/index.js Bestand weergeven

@@ -103,7 +103,7 @@ export default class Detail extends Component {
103 103
     console.log(personId, "personId")
104 104
 
105 105
     addActivityShareNum(dynamicId)
106
-    
106
+
107 107
 
108 108
     savePoint({
109 109
       event: 'share',
@@ -119,7 +119,7 @@ export default class Detail extends Component {
119 119
       path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}`,//分享地址
120 120
       imageUrl: shareContents[0].shareContentImg
121 121
     }
122
-    
122
+
123 123
   }
124 124
 
125 125
   handleSignup() {
@@ -381,12 +381,16 @@ export default class Detail extends Component {
381 381
                   <Text className="txt">收藏</Text>
382 382
                 </Button>
383 383
                 {
384
-                  parseInt(detail.isEnlist) != 0 && (parseInt(detail.isEnlist) == 2 ? (<Button disabled='true' className='submit-btn hasSigned'>报名人数已满</Button>) : ((phone ? (
384
+                  parseInt(detail.isEnlist) != 0 && detail.activityStatus != 2 && (parseInt(detail.isEnlist) == 2 ? (<Button disabled='true' className='submit-btn hasSigned'>报名人数已满</Button>) : ((phone ? (
385 385
                     <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
386 386
                   ) : (
387 387
                       <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
388 388
                     ))))
389 389
                 }
390
+                {detail.activityStatus == 2 &&
391
+                  <Button disabled='true' className='submit-btn hasSigned' >立即报名</Button>
392
+                }
393
+
390 394
                 {/* {phone ? (
391 395
                   <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
392 396
                 ) : (

+ 10
- 0
src/pages/activity/detail/index.scss Bestand weergeven

@@ -517,3 +517,13 @@ color:#dcdcdc;
517 517
   padding: 50px 30px ;
518 518
   width: 100%;
519 519
 }
520
+.btn-fixed{
521
+  position: fixed;
522
+  width: 100%;
523
+  height: 140px;
524
+  padding: 20px 0;
525
+  bottom: 0;
526
+  left:0;
527
+  background-color: #fff;
528
+  border-top: 1px solid #eee;
529
+}