Rorschach 6 years ago
parent
commit
3c1fd341aa

+ 1 - 1
component/group/group.wxss

@@ -191,7 +191,7 @@ scroll-view {
     flex-wrap: wrap;
     flex-wrap: wrap;
     flex-direction: row;
     flex-direction: row;
     overflow-x: hidden;
     overflow-x: hidden;
-
+    margin-top: 77rpx;
 }
 }
 
 
 .group-item {
 .group-item {

+ 11 - 21
pages/groupPage/collage-details/collage-details.wxml

@@ -12,7 +12,7 @@
     <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
     <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
     <view class="details-head">
     <view class="details-head">
         <!-- 剩余时间盒子 -->
         <!-- 剩余时间盒子 -->
-        <view class="last-time-box" wx:if="{{!dataLoading}}">
+        <view class="last-time-box" wx:if="{{!dataLoading}}" hidden="{{ifGroupSuccessed || !stillGoing}}">
             <view class="last-time">
             <view class="last-time">
                 <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
                 <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
                 <text class="last-time-end">距结束</text>
                 <text class="last-time-end">距结束</text>
@@ -46,38 +46,28 @@
                     <image src="../../../static/image/flower_small.png" />
                     <image src="../../../static/image/flower_small.png" />
                 </view>
                 </view>
             </view>
             </view>
-            <view class="group-regular-text" hidden="{{stillGoing}}">团购已超过时限</view>
+            <view class="group-regular-text" hidden="{{stillGoing}}">
+                {{groupOsType === 'IOS' ? '助力' : '团购'}}已超过时限
+            </view>
             <view class="group-regular-text" hidden="{{surplusNum != '0'}}">
             <view class="group-regular-text" hidden="{{surplusNum != '0'}}">
                 {{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧
                 {{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧
             </view>
             </view>
         </view>
         </view>
         <view class="group-success" wx:if="{{ifGroupSuccessed}}">
         <view class="group-success" wx:if="{{ifGroupSuccessed}}">
-            <!-- 助力团成功了 团长看到-->
+            <!-- 助力团成功了 团长看到 -->
             <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid === hosterUid}}">
             <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid === hosterUid}}">
-                <view class="group-regular-text" >
-                    恭喜,好强大的魅力
-                </view>
-                 <view class="group-regular-text" >
-                    您发起的助力团成功了
-                </view>
+                <view class="group-regular-text">恭喜,好强大的魅力</view>
+                <view class="group-regular-text">您发起的助力团成功了</view>
             </view>
             </view>
             <!-- 助力团成功了 团员看到 -->
             <!-- 助力团成功了 团员看到 -->
             <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid !== hosterUid}}">
             <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid !== hosterUid}}">
-                <view class="group-regular-text" >
-                    在你的帮助下,{{organizer.wechatName}}的助力团成功啦
-                </view>
-                 <view class="group-regular-text" >
-                    您获得了7天的本课程试用权哦
-                </view>
+                <view class="group-regular-text">在你的帮助下,{{organizer.wechatName}}的助力团成功啦</view>
+                <view class="group-regular-text">您获得了7天的本课程试用权哦</view>
             </view>
             </view>
             <!-- 团购成功了 -->
             <!-- 团购成功了 -->
             <view class="help-success" wx:if="{{groupOsType === 'ANDROID'}}">
             <view class="help-success" wx:if="{{groupOsType === 'ANDROID'}}">
-                <view class="group-regular-text" >
-                    拼团成功!
-                </view>
-                <view class="group-regular-text" >
-                    你获得了本课3年试用权哦
-                </view>
+                <view class="group-regular-text">拼团成功!</view>
+                <view class="group-regular-text">你获得了本课3年试用权哦</view>
             </view>
             </view>
         </view>
         </view>
         <!-- 头像 -->
         <!-- 头像 -->

+ 3 - 0
pages/groupPage/collage-details/collage-details.wxss

@@ -272,4 +272,7 @@
     margin-top: 20rpx;
     margin-top: 20rpx;
     margin-left: 160rpx;
     margin-left: 160rpx;
     border-radius: 10rpx;
     border-radius: 10rpx;
+}
+.help-success{
+    margin-top:41rpx;
 }
 }

+ 15 - 15
pages/groupPage/group-details/group-details.js

@@ -195,21 +195,21 @@ Page({
         return;
         return;
       }
       }
       // 团员进入collage页面
       // 团员进入collage页面
-      const myUid = wx.getStorageSync('uid');
-      if (myUid === groupOrder.organizer) {
-        wx.redirectTo({
-          url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
-        })
-        return;
-      }
-      res.data.data.joinUserList.forEach(item => {
-        if (item.uid === myUid) {
-          wx.redirectTo({
-            url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
-          })
-          return;
-        }
-      })
+      // const myUid = wx.getStorageSync('uid');
+      // if (myUid === groupOrder.organizer) {
+      //   wx.redirectTo({
+      //     url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
+      //   })
+      //   return;
+      // }
+      // res.data.data.joinUserList.forEach(item => {
+      //   if (item.uid === myUid) {
+      //     wx.redirectTo({
+      //       url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
+      //     })
+      //     return;
+      //   }
+      // })
 
 
 
 
 
 

+ 6 - 4
pages/groupPage/group-details/group-details.wxml

@@ -7,14 +7,16 @@
     <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
     <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
     <view class="details-head">
     <view class="details-head">
         <!-- 剩余时间盒子 -->
         <!-- 剩余时间盒子 -->
-        <view class="last-time-box" wx:if="{{!dataLoading}}">
-            <view class="last-time">
+        <view class="last-time-box" wx:if="{{!dataLoading}}" >
+            <view class="last-time" hidden="{{ifGroupSuccessed || !stillGoing}}">
                 <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
                 <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
                 <text class="last-time-end">距结束</text>
                 <text class="last-time-end">距结束</text>
                 <image class="right-icon" src="../../../static/groupImg/left_icon.png" />
                 <image class="right-icon" src="../../../static/groupImg/left_icon.png" />
             </view>
             </view>
-            <view class="last-text">{{timeLast}}</view>
+            <view class="last-text" hidden="{{ifGroupSuccessed || !stillGoing}}">{{timeLast}}</view>
+            <view class="last-text" wx:if="{{ifGroupSuccessed || !stillGoing}}">{{groupOsType === 'IOS' ? '助力' : '团购'}}已结束</view>
         </view>
         </view>
+        
         <!-- 还剩几人参团 -->
         <!-- 还剩几人参团 -->
         <view class="last-member" wx:if="{{!ifGroupSuccessed}}">
         <view class="last-member" wx:if="{{!ifGroupSuccessed}}">
             <view class="group-regular-text" hidden="{{surplusNum == '0' || !stillGoing}}">
             <view class="group-regular-text" hidden="{{surplusNum == '0' || !stillGoing}}">
@@ -66,7 +68,7 @@
             <view class="line2"></view>
             <view class="line2"></view>
             <view class="line3"></view>
             <view class="line3"></view>
         </view>
         </view>
-        <view class="invitation-btn" bindtap="jionGroup">
+        <view class="invitation-btn" bindtap="jionGroup" wx:if="{{!stillGoing || !ifGroupSuccessed}}">
             <text>我要{{groupOsType === 'IOS' ? '助力' : '参团'}}</text>
             <text>我要{{groupOsType === 'IOS' ? '助力' : '参团'}}</text>
         </view>
         </view>
     </view>
     </view>

+ 10 - 3
pages/main/class/class.js

@@ -74,6 +74,14 @@ Page({
 
 
       this.getReadInfo(1, 10);
       this.getReadInfo(1, 10);
       this.checkLike();
       this.checkLike();
+      // this.innerAudioContext = wx.createInnerAudioContext();
+      // this.innerAudioContext.onPause((res) => {
+      //   // 播放音频失败的回调
+      //   console.log('音频暂停')
+      // });
+      // this.innerAudioContext.onPlay(res => {
+      //   console.log('class页面视频播放了')
+      // })
     })
     })
   },
   },
   // video组件在获得url时迅速退出页面会导致小程序闪退,官方还没修复(11/28),处理办法:懒加载思路,在用户点击时再获取videoUrl
   // video组件在获得url时迅速退出页面会导致小程序闪退,官方还没修复(11/28),处理办法:懒加载思路,在用户点击时再获取videoUrl
@@ -87,8 +95,8 @@ Page({
     this.setData({
     this.setData({
       videoLoad: true
       videoLoad: true
     }, () => {
     }, () => {
-      // this.videoClassCtx = wx.createVideoContext('classVideo', this);
-      // this.videoClassCtx.play();
+      this.videoClassCtx = wx.createVideoContext('classVideo', this);
+      this.videoClassCtx.play();
     })
     })
   },
   },
   // 检查是否收藏
   // 检查是否收藏
@@ -236,7 +244,6 @@ Page({
         temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
         temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
         temp.uid = item.userRead.uid;
         temp.uid = item.userRead.uid;
         temp.id = item.userRead.id;
         temp.id = item.userRead.id;
-        console.log(item.userRead)
         this.data.works.push(temp);
         this.data.works.push(temp);
       });
       });
       this.setData({
       this.setData({

+ 20 - 12
pages/social/works/works.js

@@ -112,7 +112,7 @@ Page({
                 "title": this.data.title,
                 "title": this.data.title,
                 "lessonId": this.data.classId,
                 "lessonId": this.data.classId,
                 "productId": this.data.productId,
                 "productId": this.data.productId,
-                "playStopTime": this.videoPlayTime,
+                "playStopTime": Math.ceil(this.videoPlayTime),
                 "userReadId": this.data.userReadId,
                 "userReadId": this.data.userReadId,
                 "type": 'READ',
                 "type": 'READ',
             }
             }
@@ -224,8 +224,8 @@ Page({
             this.setData({
             this.setData({
                 isLike: true,
                 isLike: true,
                 flowerNum: res.data.count
                 flowerNum: res.data.count
-            },()=>{
-                if(res.data.count > 0){
+            }, () => {
+                if (res.data.count > 0) {
                     this.flowerAnimationHandler();
                     this.flowerAnimationHandler();
                 }
                 }
             });
             });
@@ -290,8 +290,6 @@ Page({
         this.innerAudioContext.pause();
         this.innerAudioContext.pause();
     },
     },
     videoProgress: function (e) {
     videoProgress: function (e) {
-        console.log('视频加载进度变化')
-        console.log(e)
         if (e.detail.buffered <= 10) {
         if (e.detail.buffered <= 10) {
             this.innerAudioContext.pause();
             this.innerAudioContext.pause();
         } else {
         } else {
@@ -299,10 +297,7 @@ Page({
         }
         }
     },
     },
     videoTimeupdate: function (e) {
     videoTimeupdate: function (e) {
-        console.log('视频播放进度发生变化')
-        console.log('视频当前时长', e.detail.currentTime);
         this.videoPlayTime = e.detail.currentTime
         this.videoPlayTime = e.detail.currentTime
-        console.log('音频当前时长', this.innerAudioContext.currentTime)
         if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
         if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
             this.innerAudioContext.seek(e.detail.currentTime - 0.1);
             this.innerAudioContext.seek(e.detail.currentTime - 0.1);
         }
         }
@@ -509,7 +504,7 @@ Page({
 
 
         }
         }
     },
     },
-    flowerAnimationHandler: function(){
+    flowerAnimationHandler: function () {
         this.flowerBox = this.selectComponent("#flower-box");
         this.flowerBox = this.selectComponent("#flower-box");
         this.flowerBox.comeOut();
         this.flowerBox.comeOut();
     },
     },
@@ -691,8 +686,21 @@ Page({
         this.onLoad(this.data.onLoadOption);
         this.onLoad(this.data.onLoadOption);
     },
     },
     goToClass: function () {
     goToClass: function () {
-        wx.navigateTo({
-            url: `../../main/class/class?id=${this.data.classId}`
-        })
+
+        if (!this.data.isIOS && this.videoCtx   ) {
+            this.innerAudioContext.stop();
+            this.innerAudioContext.destroy();
+            this.videoCtx.stop();
+            this.setData({
+                videoLoad: false
+            })
+        }
+
+        setTimeout(() => {
+            wx.navigateTo({
+                url: `../../main/class/class?id=${this.data.classId}`
+            })
+        }, 100)
+
     }
     }
 })
 })

+ 2 - 2
project.config.json

@@ -65,10 +65,10 @@
 					"scene": "1012"
 					"scene": "1012"
 				},
 				},
 				{
 				{
-					"id": -1,
+					"id": 4,
 					"name": "分享团",
 					"name": "分享团",
 					"pathName": "pages/groupPage/group-details/group-details",
 					"pathName": "pages/groupPage/group-details/group-details",
-					"query": "share=true&shareId=1547694928146618",
+					"query": "share=true&shareId=1548058015816289",
 					"scene": "1012"
 					"scene": "1012"
 				}
 				}
 			]
 			]

BIN
static/image/hotPlays.png