许静 5 年之前
父節點
當前提交
faa9e6b064
共有 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
   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
   }
243
       if (actState != ActFinished) {
243
       if (actState != ActFinished) {
244
         ltTicker = this.getLeftTimeTicker(res.taShareActivity.startTime, res.taShareActivity.endTime)
244
         ltTicker = this.getLeftTimeTicker(res.taShareActivity.startTime, res.taShareActivity.endTime)
245
       }
245
       }
246
-debugger
246
+      debugger
247
       Taro.hideLoading()
247
       Taro.hideLoading()
248
       this.setState({
248
       this.setState({
249
         detail: res.taShareActivity,
249
         detail: res.taShareActivity,
448
       this.togglePosterVisible()
448
       this.togglePosterVisible()
449
     })
449
     })
450
   }
450
   }
451
-  
451
+
452
   transTPLs2Configs(tpls, params) {
452
   transTPLs2Configs(tpls, params) {
453
     return tpls.map((tpl) => {
453
     return tpls.map((tpl) => {
454
       const conf = getCanvasConfig(tpl.configs, params)
454
       const conf = getCanvasConfig(tpl.configs, params)
504
     return (
504
     return (
505
       <Block>
505
       <Block>
506
         {/* 生成海报 */}
506
         {/* 生成海报 */}
507
-        { posterVisible && !ltTicker.processing &&
507
+        {posterVisible && !ltTicker.processing &&
508
           (
508
           (
509
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
509
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
510
           )
510
           )
602
                 </View>
602
                 </View>
603
 
603
 
604
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
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
                 </View>
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
                     <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
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
               </ScrollView>
632
               </ScrollView>
632
 
633
 
633
               <action-sheet hidden={!actionSheetVisible} bindchange={this.toggleActionVisible}>
634
               <action-sheet hidden={!actionSheetVisible} bindchange={this.toggleActionVisible}>

+ 7
- 3
src/pages/activity/detail/index.js 查看文件

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 查看文件

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