|
@@ -73,7 +73,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 {
|
|
@@ -120,10 +120,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
|
|
@@ -182,8 +182,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 +195,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;
|