Browse Source

调整逻辑及页面

bayi 2 years ago
parent
commit
3c5eeed0b8

+ 5 - 1
components/comment/index.js

@@ -101,6 +101,8 @@ Component({
         postId: null,
         postIndex: null,
         ifGetFocus: false,
+        firstData: {},
+        onceId: ''
       })
     },
     quickClose() {
@@ -132,9 +134,11 @@ Component({
           reslove(res)
         })
       }, this.data.type == 'comment' ? {
-        columnId: this.data.columnId
+        columnId: this.data.columnId,
+        isUpdateRead: !this.data.onceId
       } : {
         userReadId: this.data.columnId,
+        isUpdateRead: !this.data.onceId
       })
     },
     bindKeyInput(e) {

+ 1 - 1
components/comment/index.less

@@ -196,7 +196,7 @@
             }
 
             .isFans {
-              border: 1rpx solid #969696;
+              border: 1rpx solid #E2ECFB;
               background-color: #E2ECFB;
               color: #333;
             }

+ 3 - 3
components/comment/index.wxml

@@ -12,8 +12,8 @@
     </view>
     <scroll-view scroll-y="true" class="body" bindscrolltolower='loadMore' bindtap="cancelId">
       <view class="body-box">
-        <view class="content" wx:for="{{list}}" wx:key="id">
-          <image src="{{item.user.avatar}}" class="c-avatar" data-uid='{{item.user.uid}}' bindtap="jumpUserInfo" />
+        <view class="content" wx:for="{{list}}" wx:key="id" data-uid='{{item.user.uid}}' bindtap="jumpUserInfo">
+          <image src="{{item.user.avatar}}" class="c-avatar" />
           <view class="c-right" wx:if="{{type=='comment'}}">
             <view class="nickName">
               {{item.user.nickName||item.user.eid}}
@@ -52,7 +52,7 @@
               </view>
               <view class="time">{{item.gmtCreated}}</view>
             </view>
-            <view class="follow {{item.isFans?'isFans':''}}" data-user='{{item}}' bindtap="setFans">
+            <view class="follow {{item.isFans?'isFans':''}}" data-user='{{item}}' catchtap="setFans">
               <image src="{{item.isFans?'/static/follow_2.png':'/static/follow_3.png'}}" class="character" mode="" />
               <text class="text">{{item.isFans?'已关注':'关注'}}</text>
             </view>

+ 1 - 1
components/comment/index.wxss

@@ -172,7 +172,7 @@
   margin-right: 6rpx;
 }
 .commentBox .comment .body .body-box .content .c-like .isFans {
-  border: 1rpx solid #969696;
+  border: 1rpx solid #E2ECFB;
   background-color: #E2ECFB;
   color: #333;
 }

+ 1 - 1
components/videoPreview/index.less

@@ -88,7 +88,7 @@
       }
 
       .isFans {
-        border: 1rpx solid #969696;
+        border: 1rpx solid #E2ECFB;
         background-color: #E2ECFB;
         color: #333;
       }

+ 1 - 1
components/videoPreview/index.wxss

@@ -77,7 +77,7 @@
   margin-right: 6rpx;
 }
 .work .workHead .wH-right .isFans {
-  border: 1rpx solid #969696;
+  border: 1rpx solid #E2ECFB;
   background-color: #E2ECFB;
   color: #333;
 }

+ 0 - 2
mixins/video.js

@@ -87,14 +87,12 @@ module.exports = Behavior({
     openComment({
       target
     }) {
-      console.log(target);
       this.selectComponent('#comment').open(target.dataset.id)
     },
     // 打开设置类型的评论组件
     openTypeComment({
       target
     }) {
-      console.log(target);
       this.selectComponent('#comment').open(target.dataset.id, target.dataset.type, target.dataset.onceId)
     },
     // 分享

+ 1 - 0
pages/comment/index.less

@@ -16,6 +16,7 @@
     .avatar {
       width: 80rpx;
       height: 80rpx;
+      background-color: #D8D8D8;
       border-radius: 50%;
     }
 

+ 1 - 0
pages/comment/index.wxss

@@ -14,6 +14,7 @@
 .commentPage .notes .avatar {
   width: 80rpx;
   height: 80rpx;
+  background-color: #D8D8D8;
   border-radius: 50%;
 }
 .commentPage .notes .body {