Karsa 2 年之前
父节点
当前提交
23d53e095b
共有 7 个文件被更改,包括 16 次插入11 次删除
  1. 2 0
      components/questionComment/questionComment.vue
  2. 14 11
      pages/question/question.vue
  3. 二进制
      static/question/comment.png
  4. 二进制
      static/question/like.png
  5. 二进制
      static/question/like_act.png
  6. 二进制
      static/question/tease.png
  7. 二进制
      static/question/tease_act.png

+ 2 - 0
components/questionComment/questionComment.vue

@@ -80,6 +80,8 @@
 
 <style lang="scss" scoped>
 .first-comment {
+   background-color: #f4f4f4;
+   padding: 10rpx;
 	.comment {
 		color: #666;
 		display: flex;

+ 14 - 11
pages/question/question.vue

@@ -116,7 +116,7 @@
 			@close="closeCommentHandle"
 			@clickOverlay="isShowComment=false"
 		>
-			<view class="comment-cont" catchtouchmove="return">
+			<view class="comment-cont" @touchmove.stop>
 			   <view class="commment-top">
 				   <text class="title">{{comment_obj.title}} {{comment_obj.total}}</text>
 				   <view class="comment-top-right">
@@ -137,23 +137,18 @@
                <image src="@/static/nodata.png"></image>
                <view>暂无评论</view>
             </view>
-				<view class="write-wrap">
+				<view class="write-wrap" :style="{bottom: writeBottom+'px'}">
                <textarea 
                   v-model="comment_cont" 
                   placeholder="发布一条友善的评论" 
                   auto-height
+                  :adjust-position="false"
                   :show-confirm-bar="false"
                   :cursor-spacing="20"
                   class="write-ipt"
                   @focus="checkNickHandle"
+                  @blur="setWritePosition(50)"
                />
-               <!-- <input  
-                  v-model="message" 
-                  class="write-ipt" 
-                  placeholder="发布一条友善的评论" 	
-                  confirm-type="send"
-                  :cursor-spacing="20"
-               /> -->
 				  <view class="confirm-btn" @click="publishMessageHandle">发布</view>
 				</view>
 			</view>
@@ -192,6 +187,7 @@ export default {
 			
 			isShowComment: false,
 			comment_cont: '',
+         writeBottom: 50,
          select_comment_type:1,//默认精选
          select_question_item: {},
          comment_obj: {
@@ -354,8 +350,15 @@ export default {
          })
       },
       
+      setWritePosition(val=50) {
+         console.log(val)
+         this.writeBottom = val < 50 ? 50 : val;
+      },
+      
       /* 校验昵称状态*/
-      async checkNickHandle() {
+      async checkNickHandle(e) {
+         this.setWritePosition(e.detail.height);
+         
          const { data,code } = await apiCheckNick();
          
          if(code !== 200) return
@@ -606,7 +609,7 @@ page {
       padding: 0 24rpx;
       border-top: 4rpx solid #F4F4F4;
       position: absolute;
-      bottom: 100rpx;
+      // bottom: 50px;
       left: 0;
       right: 0;
       display: flex;

二进制
static/question/comment.png


二进制
static/question/like.png


二进制
static/question/like_act.png


二进制
static/question/tease.png


二进制
static/question/tease_act.png