Browse Source

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

张延森 5 years ago
parent
commit
5efa13ccfc

+ 27
- 26
src/pages/activity/detail/assemble.js View File

85
   componentDidShow() {
85
   componentDidShow() {
86
     this.startTicker()
86
     this.startTicker()
87
   }
87
   }
88
-  
88
+
89
   componentDidHide() {
89
   componentDidHide() {
90
     this.stopTicker()
90
     this.stopTicker()
91
   }
91
   }
242
       if (actState != ActFinished) {
242
       if (actState != ActFinished) {
243
         ltTicker = this.getLeftTimeTicker(res.taShareActivity.startTime, res.taShareActivity.endTime)
243
         ltTicker = this.getLeftTimeTicker(res.taShareActivity.startTime, res.taShareActivity.endTime)
244
       }
244
       }
245
-debugger
245
+      debugger
246
       Taro.hideLoading()
246
       Taro.hideLoading()
247
       this.setState({
247
       this.setState({
248
         detail: res.taShareActivity,
248
         detail: res.taShareActivity,
445
       this.togglePosterVisible()
445
       this.togglePosterVisible()
446
     })
446
     })
447
   }
447
   }
448
-  
448
+
449
   transTPLs2Configs(tpls, params) {
449
   transTPLs2Configs(tpls, params) {
450
     return tpls.map((tpl) => {
450
     return tpls.map((tpl) => {
451
       const conf = getCanvasConfig(tpl.configs, params)
451
       const conf = getCanvasConfig(tpl.configs, params)
501
     return (
501
     return (
502
       <Block>
502
       <Block>
503
         {/* 生成海报 */}
503
         {/* 生成海报 */}
504
-        { posterVisible && !ltTicker.processing &&
504
+        {posterVisible && !ltTicker.processing &&
505
           (
505
           (
506
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
506
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
507
           )
507
           )
599
                 </View>
599
                 </View>
600
 
600
 
601
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
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
                 </View>
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
                     <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
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
               </ScrollView>
629
               </ScrollView>
629
 
630
 
630
               <action-sheet hidden={!actionSheetVisible} bindchange={this.toggleActionVisible}>
631
               <action-sheet hidden={!actionSheetVisible} bindchange={this.toggleActionVisible}>

+ 7
- 3
src/pages/activity/detail/index.js View File

103
     console.log(personId, "personId")
103
     console.log(personId, "personId")
104
 
104
 
105
     addActivityShareNum(dynamicId)
105
     addActivityShareNum(dynamicId)
106
-    
106
+
107
 
107
 
108
     savePoint({
108
     savePoint({
109
       event: 'share',
109
       event: 'share',
119
       path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}`,//分享地址
119
       path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}`,//分享地址
120
       imageUrl: shareContents[0].shareContentImg
120
       imageUrl: shareContents[0].shareContentImg
121
     }
121
     }
122
-    
122
+
123
   }
123
   }
124
 
124
 
125
   handleSignup() {
125
   handleSignup() {
381
                   <Text className="txt">收藏</Text>
381
                   <Text className="txt">收藏</Text>
382
                 </Button>
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
                     <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
385
                     <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
386
                   ) : (
386
                   ) : (
387
                       <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
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
                 {/* {phone ? (
394
                 {/* {phone ? (
391
                   <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
395
                   <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
392
                 ) : (
396
                 ) : (

+ 10
- 0
src/pages/activity/detail/index.scss View File

517
   padding: 50px 30px ;
517
   padding: 50px 30px ;
518
   width: 100%;
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
+}