浏览代码

路演视频点赞评论

jwyu 2 年之前
父节点
当前提交
0b75aa93c7

+ 4 - 3
components/videoComment/comment.vue

@@ -28,6 +28,7 @@
 			title="视频评论"
 			@close="closeCommentHandle"
 			@clickOverlay="isShowComment=false"
+            z-index="99999"
 		>
 			<view class="comment-cont" @touchmove.stop>
 			   <view class="commment-top">
@@ -59,7 +60,7 @@
                         :show-confirm-bar="false"
                         :cursor-spacing="20"
                         class="write-ipt"
-                        @blur="setWritePosition(50)"
+                        @blur="setWritePosition(0)"
                         @focus="checkNickHandle"
                     />
 				    <view class="confirm-btn" @click="publishMessageHandle">发布</view>
@@ -86,7 +87,7 @@ export default {
 
             isShowComment: false,
 			comment_cont: '',
-			writeBottom: 50,
+			writeBottom: 0,
 			select_comment_type:1,//默认全部
 			comment_obj: {
 				title: '全部评论',
@@ -170,7 +171,7 @@ export default {
 
         setWritePosition(val=50) {
             console.log(val)
-            this.writeBottom = val < 50 ? 50 : val-8;
+            this.writeBottom = val < 50 ? 0 : val-8;
         },
 
         checkNickHandle(e){

+ 8 - 3
pages-roadShow/video/list.vue

@@ -42,6 +42,10 @@
                     :data-item="item">
                     <image class="share-img" src="@/static/share-icon.png" mode="aspectFill"/>
                 </button>
+                <view style="padding-top:20rpx">
+                    <view class="time">发布时间:{{item.publish_time}}</view>
+                    <view class="user-name">{{item.admin_real_name}}</view>
+                </view>
                 <video
                     autoplay
                     object-fit="contain"
@@ -54,8 +58,7 @@
                     v-if="item.road_video_id==curVideoId"
                 ></video>
                 <image @click="handelClickPlay(item)" v-else class="poster" :src="item.cover_img_url" mode="aspectFill" lazy-load/>
-                <view class="time">发布时间:{{item.publish_time}}</view>
-                <view class="user-name">{{item.admin_real_name}}</view>
+                <comment :videoInfo="getCommentData(item)"></comment>
             </view>
         </view>
 
@@ -116,10 +119,12 @@ import {apiRoadShowVideoList,apiRoadShowVideoPlayLog} from '@/api/roadShow'
 import {apiGetSceneToParams,apiUserBindPermission} from '@/api/common'
 import noAuth from './components/noAuth.vue'
 import dragButton from '@/components/dragButton/dragButton.vue'
+import comment from '@/components/videoComment/comment.vue'
 export default {
     components:{
         noAuth,
-        dragButton
+        dragButton,
+        comment
     },
     data() {
         return {

+ 16 - 3
pages-roadShow/video/search.vue

@@ -29,6 +29,10 @@
                     :data-item="item">
                     <image class="share-img" src="@/static/share-icon.png" mode="aspectFill"/>
                 </button>
+                <view style="padding-top:20rpx">
+                    <view class="time">发布时间:{{item.publish_time}}</view>
+                    <view class="user-name">{{item.admin_real_name}}</view>
+                </view>
                 <video
                     autoplay
                     object-fit="contain"
@@ -41,8 +45,7 @@
                     v-if="item.road_video_id==curVideoId"
                 ></video>
                 <image @click="handelClickPlay(item)" v-else class="poster" :src="item.cover_img_url" mode="aspectFill" lazy-load/>
-                <view class="time">发布时间:{{item.publish_time}}</view>
-                <view class="user-name">{{item.admin_real_name}}</view>
+                <comment :videoInfo="getCommentData(item)"></comment>
             </view>
         </view>
     </view>
@@ -51,9 +54,11 @@
 <script>
 import searchBox from '@/components/searchBox/searchBox.vue'
 import {apiRoadShowVideoList,apiRoadShowVideoPlayLog} from '@/api/roadShow'
+import comment from '@/components/videoComment/comment.vue'
 export default {
     components: {
-        searchBox
+        searchBox,
+        comment
     },
     data() {
         return {
@@ -90,6 +95,14 @@ export default {
         }
     },
     methods: {
+        // 处理评论模块需要的数据
+        getCommentData(item){
+            return {
+                source:3,
+                id:item.road_video_id,
+                ...item
+            }
+        },
         onChange(e){
             this.searchVal=e
         },

+ 4 - 3
pages/question/question.vue

@@ -150,6 +150,7 @@
 			title="问答评论"
 			@close="closeCommentHandle"
 			@clickOverlay="isShowComment=false"
+			z-index="99999"
 		>
 			<view class="comment-cont" @touchmove.stop>
 			   <view class="commment-top">
@@ -184,7 +185,7 @@
                   :show-confirm-bar="false"
                   :cursor-spacing="20"
                   class="write-ipt"
-                  @blur="setWritePosition(50)"
+                  @blur="setWritePosition(0)"
 					@focus="checkNickHandle"
                />
 				  <view class="confirm-btn" @click="publishMessageHandle">发布</view>
@@ -242,7 +243,7 @@ export default {
 			
 			isShowComment: false,
 			comment_cont: '',
-			writeBottom: 50,
+			writeBottom: 0,
 			select_comment_type:1,//默认全部
 			select_question_item: {},
 			comment_obj: {
@@ -439,7 +440,7 @@ export default {
       
       setWritePosition(val=50) {
          console.log(val)
-         this.writeBottom = val < 50 ? 50 : val;
+         this.writeBottom = val < 50 ? 0 : val;
       },
 	  
       

+ 16 - 4
pages/roadShow/video/list.vue

@@ -42,8 +42,10 @@
                     :data-item="item">
                     <image class="share-img" src="@/static/share-icon.png" mode="aspectFill"/>
                 </button>
-                <view class="time">发布时间:{{item.publish_time}}</view>
-                <view class="user-name">{{item.admin_real_name}}</view>
+                <view style="padding-top:20rpx">
+                    <view class="time">发布时间:{{item.publish_time}}</view>
+                    <view class="user-name">{{item.admin_real_name}}</view>
+                </view>
                 <video
                     autoplay
                     object-fit="contain"
@@ -56,7 +58,7 @@
                     v-if="item.road_video_id==curVideoId"
                 ></video>
                 <image @click="handelClickPlay(item)" v-else class="poster" :src="item.cover_img_url" mode="aspectFill" lazy-load/>
-                
+                <comment :videoInfo="getCommentData(item)"></comment>
             </view>
         </view>
 
@@ -117,10 +119,12 @@ import {apiRoadShowVideoList,apiRoadShowVideoPlayLog} from '@/api/roadShow'
 import {apiGetSceneToParams,apiUserBindPermission} from '@/api/common'
 import noAuth from './components/noAuth.vue'
 import dragButton from '@/components/dragButton/dragButton.vue'
+import comment from '@/components/videoComment/comment.vue'
 export default {
     components:{
         noAuth,
-        dragButton
+        dragButton,
+        comment
     },
     data() {
         return {
@@ -192,6 +196,14 @@ export default {
         this.getList()
     },
     methods: {
+        // 处理评论模块需要的数据
+        getCommentData(item){
+            return {
+                source:3,
+                id:item.road_video_id,
+                ...item
+            }
+        },
         async init(options){
             if(options.scene){
                 const resScene=await apiGetSceneToParams({scene_key:options.scene})