|
@@ -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>
|
|
@@ -73,7 +74,7 @@
|
|
|
import {apiSetLike,apiHotComment,apiMyComment,apiPublishComment,apiDelComment} from '@/api/question'
|
|
|
export default {
|
|
|
props:{
|
|
|
- videoInfo:null
|
|
|
+ videoInfo:null,//{source:2-视频社区\3-路演视频,id:视频社区id\路演视频id,...其他数据}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -86,7 +87,7 @@ export default {
|
|
|
|
|
|
isShowComment: false,
|
|
|
comment_cont: '',
|
|
|
- writeBottom: 50,
|
|
|
+ writeBottom: 0,
|
|
|
select_comment_type:1,//默认全部
|
|
|
comment_obj: {
|
|
|
title: '全部评论',
|
|
@@ -120,10 +121,10 @@ export default {
|
|
|
// 获取评论
|
|
|
async getComment(flag){
|
|
|
const params={
|
|
|
- community_question_id:this.info.community_video_id,
|
|
|
+ community_question_id:this.info.id,
|
|
|
curr_page: 1,
|
|
|
page_size: 10000,
|
|
|
- source:2
|
|
|
+ source:this.info.source
|
|
|
}
|
|
|
const { code,data } = this.select_comment_type===1 ? await apiHotComment(params) : await apiMyComment(params);
|
|
|
if(code !== 200) return
|
|
@@ -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){
|
|
@@ -182,8 +183,8 @@ export default {
|
|
|
if(!this.comment_cont) return wx.showToast({title: '请输入留言内容',icon: 'none'})
|
|
|
const { code } = await apiPublishComment({
|
|
|
content: this.comment_cont,
|
|
|
- community_question_id: this.info.community_video_id,
|
|
|
- source:2,
|
|
|
+ community_question_id: this.info.id,
|
|
|
+ source:this.info.source,
|
|
|
})
|
|
|
if(code===200){
|
|
|
wx.showToast({title: '发布成功'});
|
|
@@ -195,10 +196,10 @@ export default {
|
|
|
//吐槽/点赞
|
|
|
async handleSetLike(type){
|
|
|
const res=await apiSetLike({
|
|
|
- community_question_id:this.info.community_video_id,
|
|
|
+ community_question_id:this.info.id,
|
|
|
op_type: type,
|
|
|
enable: type === 1 ? Number(this.info.op_type!==1) : Number(this.info.op_type!==2),
|
|
|
- source:2
|
|
|
+ source:this.info.source
|
|
|
})
|
|
|
if(res.code===200){
|
|
|
const { enabled,op_type,like_total,tease_total } = res.data;
|