ソースを参照

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

张延森 5 年 前
コミット
5efa13ccfc
共有3 個のファイルを変更した44 個の追加29 個の削除を含む
  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 ファイルの表示

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

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

@@ -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 ファイルの表示

@@ -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
+}