Rorschach 4 năm trước cách đây
mục cha
commit
e6ef2835f7

+ 1 - 1
component/share/share.js

@@ -352,7 +352,7 @@ Component({
           this.setData({
             flowerNum: res.data.count,
           }, () => {
-            this.flowerAnimationHandler();
+            // this.flowerAnimationHandler();
           })
         }
         this.triggerEvent('addShareAmount', {

+ 5 - 6
component/share/share.wxml

@@ -1,8 +1,8 @@
 <view class="share" bindtap="close" wx:if="{{shareFlag}}" catchtouchmove="touchMove">
    <view class="btn" animation="{{animationData}}"  id="btnArea" catchtap="nothing">
        <!-- <image class="bg" src="../../static/groupImg/share.png"></image> -->
-       <view class="corss-line"></view>
-       <view class="invite-text">分享作品</view>
+       <!-- <view class="corss-line"></view> -->
+       <view class="invite-text" wx-if="{{shareStep==='firend'}}">分享作品,获得3朵<image class="cover-flower"  src="../../static/image/flower_small.png"></image></view>
        <view class="share-btn">
             <button class="share-friend" wx-if="{{shareStep==='firend'}}" open-type="share" catchtap="shareFriend">
                <image  src="../../static/image/wx_icon.png"></image>
@@ -22,10 +22,9 @@
    </cover-view> -->
    <view class="share-img" wx:if="{{imgUrls}}" id="imgArea">
        <image class="img" src="{{imgUrls}}"  catchtap="nothing"></image>
-       <view class="cover-text">分享成功,获得3朵小红花奖励</view>
-       <view class="cover-text">再接再厉~</view>
-       <view class="cover-text">现在将海报分享到朋友圈</view>
-       <view class="cover-text">还可以额外获得10朵 <image class="cover-flower"  src="../../static/image/flower_small.png"></image>!</view>
+       <view class="cover-text">将海报分享到朋友圈</view>
+       <view class="cover-text">额外获得10朵<image class="cover-flower"  src="../../static/image/flower_small.png"></image></view>
+       <!-- <view class="cover-text">还可以额外获得10朵 <image class="cover-flower"  src="../../static/image/flower_small.png"></image>!</view> -->
    </view>
 </view>
 <flowerBox id="flower-toast" flowerNum="{{flowerNum}}" />

+ 14 - 10
component/share/share.wxss

@@ -22,10 +22,10 @@
 }
 
 .invite-text {
-    width: 120rpx;
+    width: 100%;
     height: 30rpx;
     color: #262626;
-    font-size: 30rpx;
+    font-size: 34rpx;
     position: absolute;
     top: 19rpx;
     margin: 0 auto;
@@ -33,13 +33,17 @@
     right: 0;
     background: #fff;
     z-index: 2;
+    text-align: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .btn {
     position: fixed;
     bottom: -200rpx;
     width: 100%;
-    height: 200rpx;
+    height: 230rpx;
     background: #fff;
 }
 
@@ -51,13 +55,13 @@
 }
 
 .btn text {
-    font-size: 28rpx;
+    font-size: 34rpx;
 }
 
 .share-btn {
     display: flex;
     justify-content: center;
-    margin-top: 65rpx;
+    margin-top: 75rpx;
 }
 
 .share-btn image {
@@ -71,7 +75,7 @@
     flex-direction: row;
     justify-content: center;
     align-items: center;
-    font-size: 30rpx;
+    font-size: 34rpx;
     height: 85rpx;
     width: 333rpx;
     line-height: 0;
@@ -98,7 +102,7 @@
 .cover-text {
     width: 100%;
     color: #fff;
-    font-size: 30rpx;
+    font-size: 34rpx;
     text-align: center;
     display: flex;
     flex-direction: row;
@@ -108,7 +112,7 @@
 }
 
 .cover-flower {
-    width: 32rpx;
+    width: 28rpx;
     height: 34rpx;
     margin-left: 3rpx;
     margin-right: 3rpx;
@@ -133,9 +137,9 @@
     flex-direction: row;
     justify-content: center;
     align-items: center;
-    font-size: 30rpx;
+    font-size: 34rpx;
     height: 85rpx;
-    width: 333rpx;
+    width: 400rpx;
     line-height: 0;
     line-height: 33rpx;
     color: #fff;

+ 13 - 12
component/video-swiper/index.js

@@ -320,14 +320,22 @@ Component({
         },
         // 点赞
         likeTap: function likeTap(e) {
+
             if (!wx.getStorageSync('user').wechatName) {
                 wx.navigateTo({
                     url: `../../pages/login/login`
                 });
                 return;
             }
+            const isLike = e.target.dataset.islike ? e.target.dataset.islike : e.currentTarget.dataset.islike;
+            console.log('isLike', isLike)
+            if (isLike) {
+                return;
+            }
+            const id = e.target.dataset.id ? e.target.dataset.id : e.currentTarget.dataset.id;
+            const index = e.target.dataset.index ? e.target.dataset.index : e.currentTarget.dataset.index;
             this.setData({
-                addComeOut: 'add-one-come-out'
+                addComeOut: index
             })
             setTimeout(() => {
                 if (this.data.addComeOut) {
@@ -336,13 +344,6 @@ Component({
                     })
                 }
             }, 1100)
-            const isLike = e.target.dataset.islike ? e.target.dataset.islike : e.currentTarget.dataset.islike;
-            console.log('isLike', isLike)
-            if (isLike) {
-                return;
-            }
-            const id = e.target.dataset.id ? e.target.dataset.id : e.currentTarget.dataset.id;
-            const index = e.target.dataset.index ? e.target.dataset.index : e.currentTarget.dataset.index;
             console.log('视频index', index);
             if (this.data.isSwiper) {
                 let likeStr = `curQueue[${index}].isLike`;
@@ -372,10 +373,10 @@ Component({
         },
         addShareAmount: function (e) {
             console.log('+++++1', e.detail.index);
-            let str = `videoList[${e.detail.index}].shareAmount`;
-            this.setData({
-                [str]: this.data.videoList[e.detail.index].shareAmount + 1
-            })
+           
+            this.triggerEvent('addShareAmount', {
+                index:e.detail.index
+              })
         },
         // 下载视频
         download: function (e) {

+ 8 - 3
component/video-swiper/index.less

@@ -121,9 +121,14 @@
                     align-items: center;
                     margin-right: 45rpx;
 
+                    .download_image {
+                        width: 29rpx;
+                        height: 32rpx;
+                        margin-bottom: 2rpx;
+                      }
                     .delete_image {
                         width: 25rpx;
-                        height: 33rpx;
+                        height: 32rpx;
                         margin-bottom: 2rpx;
                     }
 
@@ -138,13 +143,13 @@
                     flex-direction: column;
                     align-items: center;
                     margin-right: 23rpx;
-                    padding-top: 3rpx;
+                    // padding-top: 3rpx;
                     box-sizing: border-box;
 
                     .hide_image {
                         width: 32rpx;
                         height: 33rpx;
-                        margin-bottom: 2rpx;
+                        margin-bottom: 1rpx;
                     }
 
                     .hide_text {

+ 2 - 2
component/video-swiper/index.wxml

@@ -99,7 +99,7 @@
         <view class="hide" catchtap="hide" data-status="{{item.status}}" data-id="{{item.id}}">
           <!-- <image class="hide_image" src="{{item.status==='NORMAL'? '../../static/index/hide_icon.png': '../../static/index/show_icon.png'}}" /> -->
           <image class="hide_image" src="{{item.status==='NORMAL'? '../../static/index/unlock.png': '../../static/index/lock.png'}}" />
-          <text class="hide_text">{{item.status==='NORMAL'? '公开': '仅自己可见'}}</text>
+          <text class="hide_text">{{item.status==='NORMAL'? '公开': '私密'}}</text>
         </view>
       </view>
       <!-- <view wx:if="{{item.showMyBtn && !item.ifCheck}}" class="my_btn">
@@ -153,7 +153,7 @@
       </view>
       <view class="foot_right">
         <view class="video_btn flower_btn" catchtap="{{item.isLike ?  null : 'likeTap'}}" data-index="{{index}}" data-id="{{item.id}}" data-islike="{{item.isLike}}">
-          <view class="animation-flower {{addComeOut}}">
+          <view class="animation-flower {{addComeOut === index ? 'add-one-come-out' : ''}}">
             <image class="animation-flower-icon" src="../../static/image/flower_small.png" />
             <text>+1</text>
           </view>

+ 8 - 10
component/video-swiper/index.wxss

@@ -50,12 +50,11 @@
   top: 0;
 }
 .swiper_container .swiper_item .head_box .user_box {
-  width: 360rpx;
+  width: 378rpx;
   height: 100%;
   display: flex;
   align-items: center;
   position: relative;
-  overflow: hidden;
 }
 .swiper_container .swiper_item .head_box .user_box .avatar {
   width: 80rpx;
@@ -95,20 +94,20 @@
   display: flex;
   align-items: center;
 }
-.swiper_container .swiper_item .head_box .my_btn .delete .download_image {
-  width: 29rpx;
-  height: 33rpx;
-  margin-bottom: 2rpx;
-}
 .swiper_container .swiper_item .head_box .my_btn .delete {
   display: flex;
   flex-direction: column;
   align-items: center;
   margin-right: 45rpx;
 }
+.swiper_container .swiper_item .head_box .my_btn .delete .download_image {
+  width: 29rpx;
+  height: 32rpx;
+  margin-bottom: 2rpx;
+}
 .swiper_container .swiper_item .head_box .my_btn .delete .delete_image {
   width: 25rpx;
-  height: 33rpx;
+  height: 32rpx;
   margin-bottom: 2rpx;
 }
 .swiper_container .swiper_item .head_box .my_btn .delete .delete_text {
@@ -120,13 +119,12 @@
   flex-direction: column;
   align-items: center;
   margin-right: 23rpx;
-  padding-top: 3rpx;
   box-sizing: border-box;
 }
 .swiper_container .swiper_item .head_box .my_btn .hide .hide_image {
   width: 32rpx;
   height: 33rpx;
-  margin-bottom: 2rpx;
+  margin-bottom: 1rpx;
 }
 .swiper_container .swiper_item .head_box .my_btn .hide .hide_text {
   font-size: 26rpx;

+ 5 - 1
pages/index/index.js

@@ -705,7 +705,7 @@ Page({
           console.log('评论回显', res.data.data.userRead.commentAmount)
           let str = `videoList[${this.data.commentIndex}].commentAmount`;
           this.setData({
-            [str]:res.data.data.userRead.commentAmount
+            [str]: res.data.data.userRead.commentAmount
           })
         })
       }
@@ -1004,5 +1004,9 @@ Page({
   },
   addShareAmount: function (e) {
     console.log('+++++1', e)
+    let str = `videoList[${e.detail.index}].shareAmount`;
+    this.setData({
+      [str]: this.data.videoList[e.detail.index].shareAmount + 1
+    })
   }
 })

+ 1 - 1
pages/index/index.wxml

@@ -46,7 +46,7 @@
   </view>
   <!-- 调用组件 -->
   <template is="{{templates}}" wx:if="{{myIndex === 3 || myIndex === 2}}" data="{{myData: myData,coursesData:coursesData,noMoreWork:noMoreWork}}"></template>
-  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{isSwiper}}" noMoreWork="{{noMoreWork}}" ifHeadTap="{{true}}" bindopenShare="openShare" bindopenComment="openComment" bindheadTap="headTapHandler" bindgoToReading="goToReading" bindcollectTap="collectTap" bindlikeTap="likeTap" binddelHideMyWork="delHideMyWork" bindchange="videoChange">
+  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{isSwiper}}" noMoreWork="{{noMoreWork}}" ifHeadTap="{{true}}" bindopenShare="openShare" bindopenComment="openComment" bindheadTap="headTapHandler" bindgoToReading="goToReading" bindcollectTap="collectTap" bindlikeTap="likeTap" binddelHideMyWork="delHideMyWork" bindaddShareAmount="addShareAmount" bindchange="videoChange">
     <!-- bindplay="onPlay"
   bindpause="onPause"
   bindtimeupdate="onTimeUpdate"

+ 7 - 0
pages/mycollection/mycollection.js

@@ -229,5 +229,12 @@ Page({
         path: '/pages/index/index',
       }
     }
+  },
+  addShareAmount: function (e) {
+    console.log('+++++1', e)
+    let str = `videoList[${e.detail.index}].shareAmount`;
+    this.setData({
+      [str]: this.data.videoList[e.detail.index].shareAmount + 1
+    })
   }
 })

+ 1 - 1
pages/mycollection/mycollection.wxml

@@ -11,7 +11,7 @@
       <view class='left'>{{ item.userRead.summary }}</view>
     </view> 
   </view> -->
-  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{isSwiper}}" ifHeadTap="{{true}}" bindopenComment="openComment" bindheadTap="headTapHandler" bindgoToReading="goToReading" bindcollectTap="collectTap" bindlikeTap="likeTap" bindopenShare="openShare" binddelHideMyWork="delHideMyWork" bindchange="videoChange" />
+  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{isSwiper}}" ifHeadTap="{{true}}" bindopenComment="openComment" bindheadTap="headTapHandler" bindgoToReading="goToReading" bindcollectTap="collectTap" bindlikeTap="likeTap" bindopenShare="openShare" binddelHideMyWork="delHideMyWork" bindaddShareAmount="addShareAmount" bindchange="videoChange" />
   <!-- <myPlacerholder line1="{{line1}}" line2="{{line2}}" wx:if="{{collection_data.length <= 0}}" /> -->
   <view class="comment_section" catchtouchmove="commentTouchMove" catchtap="commentTap" data-type="blank" wx:if="{{commentShow}}">
     <Comment data-type="list" commentId="{{commentId}}" commentNum="{{commentNum}}" inputValue="{{inputValue}}" bindsendReply="sendReply" />

+ 7 - 0
pages/myworks/myworks.js

@@ -281,4 +281,11 @@ Page({
       }
     }
   },
+  addShareAmount: function (e) {
+    console.log('+++++1', e)
+    let str = `videoList[${e.detail.index}].shareAmount`;
+    this.setData({
+      [str]: this.data.videoList[e.detail.index].shareAmount + 1
+    })
+  }
 })

+ 1 - 1
pages/myworks/myworks.wxml

@@ -36,7 +36,7 @@
   </view>
 
 
-  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{false}}" bindopenComment="openComment" bindheadTap="headTapHandler" bindcollectTap="collectTap" bindlikeTap="likeTap" bindopenShare="openShare" bindgoToReading="goToReading" bindplay="onPlay"></VideoSwiper>
+  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{false}}" bindopenComment="openComment" bindheadTap="headTapHandler" bindcollectTap="collectTap" bindlikeTap="likeTap" bindopenShare="openShare" bindgoToReading="goToReading" bindaddShareAmount="addShareAmount" bindplay="onPlay"></VideoSwiper>
 </scroll-view>
 <view class="comment_section" catchtouchmove="touchMove"  catchtap="commentTap" data-type="blank" wx:if="{{commentShow}}">
     <Comment data-type="list" commentId="{{commentId}}" />

+ 7 - 0
pages/reading/reading.js

@@ -810,4 +810,11 @@ Page({
         })
         this.triggerEvent('inputBlur');
     },
+    addShareAmount: function (e) {
+        console.log('+++++1', e)
+        let str = `videoList[${e.detail.index}].shareAmount`;
+        this.setData({
+          [str]: this.data.videoList[e.detail.index].shareAmount + 1
+        })
+      }
 })

+ 1 - 1
pages/reading/reading.wxml

@@ -74,7 +74,7 @@
             <text>{{tone}}/100</text>
         </view>
     </view>
-    <VideoSwiper bindopenShare="openShare" wx:if="{{videoList && videoList.length > 0 && isVideoListShow}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{false}}" noMoreWork="{{noMoreWork}}" bindopenComment="openComment" bindheadTap="headTapHandler" bindcollectTap="collectTap" bindlikeTap="likeTap" bindgoToReading="goToReading" bindonPlay="onPlay"></VideoSwiper>
+    <VideoSwiper bindopenShare="openShare" wx:if="{{videoList && videoList.length > 0 && isVideoListShow}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{false}}" noMoreWork="{{noMoreWork}}" bindopenComment="openComment" bindheadTap="headTapHandler" bindcollectTap="collectTap" bindlikeTap="likeTap" bindgoToReading="goToReading" bindaddShareAmount="addShareAmount" bindonPlay="onPlay"></VideoSwiper>
 </view>
 <view class="comment_section" catchtouchmove="touchMove" catchtap="commentTap" data-type="blank" wx:if="{{commentShow}}">
     <Comment data-type="list"  commentId="{{commentId}}" />

+ 2 - 2
pages/social/littleFlower/littleFlower.wxml

@@ -53,10 +53,10 @@
     <!-- <view class="lego-section" bindtap="goToPrize">
         <image class="lego" src="../../../static/image/lego_icon.png" />
     </view> -->
-    <view class="explain">
+    <!-- <view class="explain">
         <view class="explain-gut">小红花有什么用?</view>
         <view class="explain-gut">我们会启动很多好玩的活动,</view>
         <view class="explain-gut">到时候你将会有大大的惊喜哦!</view>
         <view class="explain-gut">请继续积攒小红花吧!</view>
-    </view>
+    </view> -->
 </view>

BIN
static/index/res_comment.png


BIN
static/index/res_eye.png


BIN
static/index/res_like.png


BIN
static/index/res_share.png


BIN
static/index/res_star.png


+ 1 - 1
templates/courses/courses.wxml

@@ -25,7 +25,7 @@
                     </view>
                     <view class="collect course_btn" data-index="{{index}}" data-id="{{item.userRead.id}}" data-type="{{item.userRead.type}}" >
                         <image class="collect_icon btn_icon" src="../../static/index/res_star.png" />
-                        <text class="collect_text btn_text">{{item.userRead.shareAmount}}</text>
+                        <text class="collect_text btn_text">{{item.userRead.favoritesAmount}}</text>
                     </view>
                 </view>
         </view>