Rorschach 3 سال پیش
والد
کامیت
fb8ac9291d

+ 2 - 1
component/comment/comment.js

@@ -28,7 +28,8 @@ Component({
     commentList: [],
     ifGetFocus: false,
     replyType: 'works' ,// 回复类型,works是回复作品,comment是回复评论
-    isScroll: true
+    isScroll: true,
+    adjustPosition: true
   },
 
   /**

+ 7 - 7
component/comment/comment.less

@@ -1,6 +1,6 @@
 .comment_container {
-    position: fixed;
-    z-index: 9999;
+    position: absolute;
+    z-index: 99;
     bottom: 0;
     width: 100%;
     // height: auto;
@@ -42,7 +42,7 @@
 
             .avatar_box {
                 width: 111rpx;
-                height: 100%;
+                height: 111rpx;
                 display: block;
                 margin-right: 15rpx;
 
@@ -117,7 +117,7 @@
 
                     .info {
                         width: 200rpx;
-                        height: 100%;
+                        // height: 100%;
                         display: flex;
                         position: relative;
 
@@ -174,12 +174,12 @@
 
 
     .comment_input {
-        width: 100%;
+        width: 700rpx;
         height: 205rpx;
         background: #eee;
         position: fixed;
         bottom: 0;
-        z-index: 9999;
+        z-index: 999;
         padding-left: 24rpx;
         box-sizing: border-box;
         display: flex;
@@ -187,7 +187,7 @@
 
         .send_input {
             width: 575rpx;
-            height: 94rpx;
+            // height: 94rpx;
             background: #fff;
             border-radius: 10rpx;
             padding-left: 50rpx;

+ 9 - 7
component/comment/comment.wxml

@@ -14,7 +14,9 @@
                         <text class="reply_nickname">{{inner.user.wechatName}}:</text>
                         <text class="reply_text">{{inner.content}}</text>
                     </view>
-                    <view wx:if="{{item.replyCount > 1 && item.showControl == 0}}" catchtap="showMore" data-index="{{index}}" class="more_btn">更多></view>
+                    <view wx:if="{{item.replyCount > 1 && item.showControl == 0}}" catchtap="showMore" data-index="{{index}}" class="more_btn">
+                        更多>
+                    </view>
                 </view>
                 <view class="time_info">
                     <view class="time">{{item.time}}</view>
@@ -32,9 +34,9 @@
             </view>
         </view>
     </view>
-    <view class="comment_input">
-        <input name="send_input" bindfocus="bindfocus" bindblur="closeblur" class="send_input" confirm-type="hold" focus="{{ifGetFocus}}" value="{{inputValue}}" bindinput="textInput" bindconfirm="sendReply" placeholder="留下你的赞美,鼓励一下。" />
-        <view class="send_btn" bindtap="sendReply">发送</view>
-    </view>
-<flowerBox id="flower-toast" flowerNum="{{flowerNum}}" />
-</scroll-view>
+    <flowerBox id="flower-toast" flowerNum="{{flowerNum}}" />
+</scroll-view>
+<view class="comment_input">
+    <input name="send_input" adjust-position="{{adjustPosition}}" bindfocus="bindfocus" bindblur="closeblur" class="send_input" confirm-type="hold" focus="{{ifGetFocus}}" value="{{inputValue}}" bindinput="textInput" bindconfirm="sendReply" placeholder="留下你的赞美,鼓励一下。" />
+    <view class="send_btn" bindtap="sendReply">发送</view>
+</view>

+ 31 - 6
component/comment/comment.wxss

@@ -1,5 +1,5 @@
 .comment_container {
-  position: fixed;
+  position: absolute;
   z-index: 9999;
   bottom: 0;
   width: 100%;
@@ -8,6 +8,7 @@
   padding-bottom: 200rpx;
   box-sizing: border-box;
 }
+
 .comment_container .comment_number {
   width: 100%;
   height: 68rpx;
@@ -17,6 +18,7 @@
   color: #4a4a4a;
   font-size: 30rpx;
 }
+
 .comment_container .comment_item {
   width: 100%;
   display: flex;
@@ -26,6 +28,7 @@
   box-sizing: border-box;
   margin-bottom: 14rpx;
 }
+
 .comment_container .comment_item .comment_box {
   width: 100%;
   display: flex;
@@ -35,33 +38,39 @@
   padding-left: 48rpx;
   border-bottom: 1rpx solid rgba(151, 151, 151, 0.34);
 }
+
 .comment_container .comment_item .comment_box .avatar_box {
   width: 111rpx;
   height: 100%;
   display: block;
   margin-right: 15rpx;
 }
+
 .comment_container .comment_item .comment_box .avatar_box image {
   width: 96rpx;
   height: 96rpx;
   background: chocolate;
   border-radius: 50%;
 }
+
 .comment_container .comment_item .comment_box .comment_info {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   width: 100%;
 }
+
 .comment_container .comment_item .comment_box .comment_info .nickname {
   font-size: 30rpx;
   color: rgba(0, 0, 0, 0.6);
 }
+
 .comment_container .comment_item .comment_box .comment_info .comment_text {
   font-size: 30rpx;
   color: rgba(0, 0, 0, 0.8);
   margin-bottom: 23rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .comment_reply_wrapper {
   background: rgba(0, 0, 0, 0.03);
   width: 100%;
@@ -69,13 +78,16 @@
   padding-top: 10rpx;
   box-sizing: border-box;
 }
+
 .comment_container .comment_item .comment_box .comment_info .comment_reply_wrapper .comment_reply_item {
   font-size: 28rpx;
   color: rgba(0, 0, 0, 0.8);
 }
+
 .comment_container .comment_item .comment_box .comment_info .comment_reply_wrapper .comment_reply_item .reply_nickname {
   color: rgba(1, 67, 124, 0.8);
 }
+
 .comment_container .comment_item .comment_box .comment_info .comment_reply_wrapper .more_btn {
   display: flex;
   justify-content: flex-end;
@@ -87,6 +99,7 @@
   box-sizing: border-box;
   padding-bottom: 20rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info {
   width: 100%;
   display: flex;
@@ -95,16 +108,19 @@
   align-items: center;
   margin-top: 30rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .time {
   color: rgba(0, 0, 0, 0.8);
   font-size: 28rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info {
   width: 200rpx;
   height: 100%;
   display: flex;
   position: relative;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info .like {
   width: 80rpx;
   height: 35rpx;
@@ -114,15 +130,18 @@
   top: -14rpx;
   left: 0;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info .like image {
   width: 30rpx;
   height: 27rpx;
   margin-right: 12rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info .like text {
   font-size: 22.4rpx;
   color: rgba(0, 0, 0, 0.8);
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info .comment {
   width: 80rpx;
   height: 35rpx;
@@ -132,16 +151,19 @@
   top: -14rpx;
   left: 120rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info .comment image {
   width: 28.8rpx;
   height: 25rpx;
   margin-right: 16rpx;
 }
+
 .comment_container .comment_item .comment_box .comment_info .time_info .info .comment text {
   font-size: 22.4rpx;
   color: rgba(0, 0, 0, 0.8);
 }
-.comment_container .comment_input {
+
+.comment_input {
   width: 100%;
   height: 205rpx;
   background: #eee;
@@ -153,22 +175,25 @@
   display: flex;
   align-items: center;
 }
-.comment_container .comment_input .send_input {
+
+.comment_input .send_input {
   width: 575rpx;
   height: 94rpx;
   background: #fff;
   border-radius: 10rpx;
   padding-left: 50rpx;
 }
-.comment_container .comment_input .send_input ::placeholder {
+
+.comment_input .send_input ::placeholder {
   text-indent: 10rpx;
   color: #000;
 }
-.comment_container .comment_input .send_btn {
+
+.comment_input .send_btn {
   width: 120rpx;
   height: 48rpx;
   line-height: 48rpx;
   text-align: center;
   color: #42a8ff;
   font-size: 34rpx;
-}
+}

+ 1 - 1
pages/activity/index/index.wxss

@@ -246,7 +246,7 @@ border-radius: 0 20rpx 0 20rpx;
   top: 0;
   left: 0;
   width: 100%;
-  height: 98%;
+  height: 100%;
   z-index: 9999;
   background: rgba(0, 0, 0, .3);
   overflow: hidden;

+ 1 - 1
pages/index/index.wxss

@@ -360,7 +360,7 @@
   top: 0;
   left: 0;
   width: 100%;
-  height: 98%;
+  height: 100%;
   z-index: 9999;
   background: rgba(0, 0, 0, .3);
   overflow: hidden;

+ 1 - 1
pages/reading/reading.wxss

@@ -41,7 +41,7 @@ audio {
     top: 0;
     left: 0;
     width: 100%;
-    height: 98%;
+    height: 100%;
     z-index: 9999;
     background: rgba(0, 0, 0, .3);
     overflow: hidden;