(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{1011:function(t,e,o){"use strict";o.r(e);o(12),o(14),o(13),o(6),o(16),o(11),o(17);var n=o(4),r=o(26),d=(o(91),o(29),o(24),o(130),o(178),o(92),o(34),o(5)),c=o(94),l=o.n(c);function m(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function h(t){for(var i=1;i0&&(this.amount_id=this.videoList[0].id,this.showVideo=this.videoList[0]);1==this.comment_open&&this.getCommentData()},getData:function(t,e){var o=this;this.commentlist=[];var n={};"default"==this.videoActiveType?this.$route.query.from&&"me"==this.$route.query.from?(this.url="plugin.video-share.frontend.video.my-video",n.status=this.status):this.url="plugin.video-share.frontend.video.getList":(this.url="plugin.video-share.frontend.video.getList","follow"==this.videoActiveType?n={search:{is_follow:1}}:"recommend"==this.videoActiveType&&(n={search:{is_recommend:1}})),n.page=this.page,this.fun.$post(this.url,n,"load").then((function(n){if(o.loading=!1,1===n.result){try{n.data.is_plugins&&(o.is_plugins=n.data.is_plugins),n.data.points_plugin&&(o.points_plugin=n.data.points_plugin),n.data.hasOwnProperty("comment_open")&&(o.comment_open=n.data.comment_open)}catch(t){console.log(t)}if(e)if(console.log("默认",o.url),o.$route.query.from&&"me"==o.$route.query.from?(o.total_page=n.data.video.last_page,o.videoList=n.data.video.data):(o.total_page=n.data.list.last_page,o.videoList=n.data.list.data),t){if(o.fun.getKey("video_goods_id")){for(var r=0;r0&&(o.amount_id=o.videoList[0].id,o.showVideo=o.videoList[0]);1==o.comment_open&&o.getCommentData()}else o.$message.error(n.msg)})).catch((function(t){o.loading=!1,console.error(t)}))},getMoreData:function(){var t=this;if(this.isLoadMore=!1,!(this.page>=this.total_page)){this.page=this.page+1;var e={};"follow"==this.videoActiveType?e={search:{is_follow:1}}:"recommend"==this.videoActiveType?e={search:{is_recommend:1}}:this.$route.query.from&&"me"==this.$route.query.from&&(e={status:this.status}),e.page=this.page,this.fun.$post(this.url,e).then((function(e){if(1===e.result){var o=[];o="default"==t.videoActiveType&&t.$route.query.from&&"me"==t.$route.query.from?e.data.video.data:e.data.list.data,t.videoList=t.videoList.concat(o)}else t.page=t.page-1}))}},previous:function(){var t=this;this.activeVideoIndex>0?(this.activeVideoIndex=this.activeVideoIndex-1,this.changeVideoEvent(this.activeVideoIndex),this.isPrevious=!0):this.$message.info("没有上一个了~"),setTimeout((function(){t.isPrevious=!1}),500)},nextOne:function(){var t=this;this.activeVideoIndex>=this.videoList.length-3?(this.activeVideoIndex=e.data.list.last_page&&(t.commentFinished=!0)):t.$message.error(e.msg)})).catch((function(e){t.commentLoading=!1,console.log(e)})))},getRely:function(t){var e=this;if(!this.commentLoading){this.commentLoading=!0;var o=this.commentlist[t].id,n=Math.floor(this.commentlist[t].append_arr.length/5)+1;this.fun.$get("plugin.video-share.frontend.comment.get-replys",{comment_id:o,page:n}).then((function(o){e.commentLoading=!1,1===o.result?e.commentlist[t].append_arr=e.commentlist[t].append_arr.concat(o.data.data)||[]:e.$message.error(o.msg)}))}},replyIt:function(t,e,o){console.log(t,e,o),this.comment_id=t.id,this.comment_member=t,this.itemChild_index=o,e&&(this.comment_id=e.id,this.comment_member=e)},replyDel:function(){this.comment_id=""},sendComment:function(){var t=this;console.log("发送评论===========",this.amount_id,this.comment_id);var e={content:this.content_text},o="plugin.video-share.frontend.comment.create-comment";this.comment_id?this.comment_id&&(e.comment_id=this.comment_id,o="plugin.video-share.frontend.comment.reply-comment"):e.video_id=this.amount_id,this.fun.$post(o,e).then((function(e){1===e.result?(t.$message.success("评论成功"),t.content_text="","1"==e.data.type?(t.commentlist.unshift({append_arr:[],id:e.data.id,support_num:0,head_image:e.data.head_img_url,nick_name:e.data.nick_name,created_at:e.data.created_at,content:e.data.content,can_del:1}),t.commentTotal+=1):"2"==e.data.type&&(t.commentlist[t.itemChild_index].reply_num+=1,t.commentlist[t.itemChild_index].append_arr.unshift({id:e.data.id,support_num:0,head_image:e.data.head_img_url,nick_name:e.data.nick_name,created_at:e.data.created_at,content:e.data.content,can_del:1,reply_name:e.data.reply_name}))):t.$message.error(e.msg)})).catch((function(t){console.log(t)}))},delComment:function(t,e){var o=this;console.log("删除评论===========",t,e);var n={};n.comment_id=-1==e?this.commentlist[t].id:this.commentlist[t].append_arr[e].id,this.fun.$post("plugin.video-share.frontend.comment.del",n).then((function(n){1===n.result?(o.$message.success("已删除"),-1==e?(o.commentlist.splice(t,1),o.commentTotal--):(o.commentlist[t].reply_num=o.commentlist[t].reply_num-1,o.commentlist[t].append_arr.splice(e,1))):o.$message.error(n.msg)})).catch((function(t){console.log(t)}))},clickLikeItem:function(t,e,o){var n=this;console.log(".....点赞||取消点赞.....",t,e);var r={comment_id:this.commentlist[t].id};null!=e&&""!==e&&(r.comment_id=this.commentlist[t].append_arr[e].id),this.fun.$post("plugin.video-share.frontend.comment.support",r).then((function(r){if(1===r.result)if(null!=e&&""!==e){n.$set(n.commentlist[t].append_arr[e],"is_support",!o);var d=n.commentlist[t].append_arr[e].support_num;n.$set(n.commentlist[t].append_arr[e],"support_num",o?--d:++d)}else{n.$set(n.commentlist[t],"is_support",!o);var c=n.commentlist[t].support_num;n.$set(n.commentlist[t],"support_num",o?--c:++c)}else n.$message.error(r.msg)})).catch((function(t){console.log(t)}))},videoPlay:function(){this.isPlay?(this.isPlay=!1,this.$refs.VueAliplayerV2.pause()):this.$refs.VueAliplayerV2.play()},ended:function(){this.$refs.VueAliplayerV2.replay()},addRecord:function(){this.isPlay=!0,this.amount_id!=this.old_amount_id&&(this.old_amount_id=this.amount_id,this.fun.$get("plugin.video-share.frontend.video.addRecord",{video_id:this.amount_id}).then((function(t){1==t.result?console.log("播放记录成功"):console.log("播放记录失败")}),(function(t){console.log(t.msg)})))},followMember:function(t,e){var o=this;this.fun.$get("plugin.video-share.frontend.video.editFollow",{member_id:t,follow_type:1==e?2:1}).then((function(t){if(1==t.result){var n=1==e?0:1;o.showVideo.is_follow=n,o.$set(o.showVideo,"is_follow",n);var r=1==e?"已取消关注":"关注成功";o.$message.success(r)}}))},timeupdate:function(t){this.videoList.length<=0||(this.isPlay=!0,v=this.$refs.VueAliplayerV2,console.log(t.currentTarget.currentTime,v.getDuration()))},getViewTimelog:function(){this.is_openRedpack&&this.logID!=this.amount_id&&(this.logID=this.amount_id,console.log("触发了getViewTimelog==========================",this.amount_id,this.maxTime),this.fun.$get("plugin.video-redpack.frontend.activity.logViewTime",{video_id:this.amount_id,video_length:this.maxTime}).then((function(t){})).catch((function(t){console.error(t)})))},onTimeupdate:function(t){this.currentDuration=t;var e=parseInt((this.cumulativeDuration+this.currentDuration)/60);this.openRedpackTimes.indexOf(e)>-1&&(this.openRedpackTimes.splice(0,1),console.log("删除一个累计时长条件",this.openRedpackTimes),this.includeRedpackID("time",e))},includeRedpackID:function(t,e,o,text){if(this.is_openRedpack){if(this.logID=0,"success"===o&&(this.showVideoAnswer=!1),"time"==t){for(var i=0;i-1&&"1"==this.openRedpackData[n].view_finish_open_state)return this.activity_reward_id=this.openRedpackData[n].activity_id,console.log("短视频红包指定视频",this.amount_id,this.activity_reward_id),void this.getRedpackReward(2,1);if(this.videoShare.needAnswer&&this.points_plugin&&this.videoShare.is_show)return void(this.videoShare.show=!0);"success"===o?(this.showVideoAnswer=!1,this.successShow=!0):(this.$refs.video.play(),this.getViewTimelog()),"fail"===o&&this.$message.error(text)}else{if(this.videoShare.needAnswer&&this.points_plugin&&this.videoShare.is_show)return void(this.videoShare.show=!0);"success"===o&&(this.showVideoAnswer=!1,this.successShow=!0),"fail"===o&&this.$message.error(text)}},getRedpackReward:function(t,e){var o=this;this.reward_type=t,this.fun.$get("plugin.video-redpack.frontend.activity.reward",{video_id:this.amount_id,activity_id:this.activity_reward_id,reward_type:t,request_type:e},"load").then((function(t){1===t.result?1==e?(o.$refs.video.pause(),o.showRedpack=!0,o.redpack_info=t.data):(o.redpack_info.amount=t.data.amount,o.openRedpack=!0):o.$message.error(t.msg)})).catch((function(t){console.error(t)}))},getBasicSet:function(){var t=this;this.fun.$get("plugin.video-share.frontend.video.getBasicSet",{}," ").then((function(e){1===e.result?(t.videoBasicSet=e.data.set,t.$store.commit("setVideoBasicSet",t.videoBasicSet)):t.$message.error(e.msg)})).catch((function(t){console.error(t)}))},toGood:function(t){window.open(this.fun.getSiteRoot()+"/plugins/shop_server/goods/"+t.goods_id+"?i="+this.fun.getKeyByI()+"&vid="+t.id,"_blank")},copyContent:function(text){this.fun.copyContent(text),this.$message.success("复制成功")},toUrl:function(t,e){this.$router.push(this.fun.getUrl(t,e))},createQrc:function(t){var e=this;setTimeout((function(){e.$nextTick((function(){canvas=document.getElementById("qrccode-canvas-code"),l.a.toCanvas(canvas,t,(function(t){t&&console.log(t)}))}))}),200)},debounce:function(t,e,o){var n;return function(){var r=this,d=arguments;d[0].flag=o,n&&clearTimeout(n),n=setTimeout((function(){t.apply(r,d)}),e)}},handleScroll:function(t){var e;this.isCommentScroll||("up"===(e="mousewheel"===t.flag?t.deltaY>0?"down":"up":t.detail>0?"down":"up")?this.previous():this.nextOne(),console.log(t.detail,t.flag,t.deltaY,e))}}},_=f,x=(o(905),o(907),o(1)),component=Object(x.a)(_,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"video"},[o("client-only",[o("div",{staticClass:"course-bottom",class:[t.isPrevious?"scroll-top":"",t.isNext?"scroll-down":""]},[o("div",{staticClass:"course-left"},[o("div",{staticClass:"video-box",attrs:{id:"vue-aliplayer-v2-box"},on:{click:function(e){return e.stopPropagation(),t.videoPlay.apply(null,arguments)}}},[o("vue-aliplayer-v2",{directives:[{name:"show",rawName:"v-show",value:t.showVideo,expression:"showVideo"}],ref:"VueAliplayerV2",attrs:{source:t.showVideo.video_src,options:t.options},on:{play:t.addRecord,ended:t.ended,playing:t.timeupdate}}),t._v(" "),o("div",{staticClass:"up-control",on:{click:function(e){return e.stopPropagation(),t.previous.apply(null,arguments)}}},[o("i",{staticClass:"iconfont icon-member-top"})]),t._v(" "),o("div",{staticClass:"next-control",on:{click:function(e){return e.stopPropagation(),t.nextOne.apply(null,arguments)}}},[o("i",{staticClass:"iconfont icon-member-bottom"})])],1)]),t._v(" "),o("div",{staticClass:"course-right"},[o("div",{staticClass:"member-box"},[o("div",{staticClass:"member-box-left"},[o("img",{staticClass:"actor",attrs:{src:t.showVideo.member?t.showVideo.member.avatar:"",alt:""}}),t._v(" "),o("div",{staticClass:"member-name-box"},[o("p",{staticClass:"member-name"},[t._v(t._s(t.showVideo.member?t.showVideo.member.nickname:""))]),t._v(" "),o("div",{staticClass:"create-time"},[t._v(t._s(t.showVideo.created_at))])])]),t._v(" "),o("div",{staticClass:"member-box-right"},[o("div",{staticClass:"btn-box",class:{is_follow:1==t.showVideo.is_follow},on:{click:function(e){return e.stopPropagation(),t.followMember(t.showVideo.member.uid,t.showVideo.is_follow)}}},[1!=t.showVideo.is_follow?o("i",{staticClass:"iconfont icon-life-game-plus"}):t._e(),t._v(" "),o("span",{staticStyle:{"line-height":"1.1"}},[t._v(t._s(t.showVideo.is_follow?"已关注":"关注"))])])])]),t._v(" "),o("div",{staticClass:"desc-box text-overflow-3"},[t._v("\n "+t._s(t.showVideo.title)+"\n ")]),t._v(" "),o("div",{staticClass:"member-box-bottom"},[o("div",{staticClass:"like-box",on:{click:function(e){return e.stopPropagation(),t.toggleLike(t.showVideo)}}},[1==t.showVideo.member_like?o("i",{staticClass:"iconfont icon-bc_like_normal"}):t._e(),1!=t.showVideo.member_like?o("i",{staticClass:"iconfont icon-zb_all_like"}):t._e(),o("span",[t._v(t._s(t.showVideo.like_num?t.calNum(t.showVideo.like_num):0))])]),t._v(" "),o("el-popover",{attrs:{placement:"bottom",width:"300",trigger:"click"}},[o("div",{staticClass:"share-pop-box"},[o("p",{staticStyle:{"font-size":"13px"}},[t._v("微信【扫一扫】分享或者复制链接到第三方平台分享")]),t._v(" "),o("div",{staticClass:"share-code"},[o("canvas",{attrs:{id:"qrccode-canvas-code"}}),t._v(" "),o("div",{staticClass:"share-code-link"},[o("p",{staticStyle:{color:"#ec544a","font-size":"12px"}},[t._v("链接:")]),t._v(" "),o("div",{staticClass:"link-box"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.current_url,expression:"current_url"}],staticClass:"link",attrs:{title:"",readonly:"true",type:"text"},domProps:{value:t.current_url},on:{input:function(e){e.target.composing||(t.current_url=e.target.value)}}}),o("span",{staticClass:"copy-btn",on:{click:function(e){return e.stopPropagation(),t.copyContent(t.current_url)}}},[t._v("复制")])])])])]),t._v(" "),o("div",{staticClass:"share-box",attrs:{slot:"reference"},on:{click:function(e){return t.createQrc(t.current_url)}},slot:"reference"},[o("i",{staticClass:"iconfont icon-bc_share_card"}),o("span",[t._v(t._s(t.showVideo.share_num?t.calNum(t.showVideo.share_num):"0"))])])])],1),t._v(" "),t.showVideo.goods?o("div",{staticClass:"goods-list-box"},[o("div",{staticClass:"goods-item",on:{click:function(e){return e.stopPropagation(),t.toGood(t.showVideo)}}},[o("img",{staticClass:"good-img",attrs:{src:t.showVideo.goods.thumb,alt:""}}),t._v(" "),o("div",{staticClass:"good-right"},[o("p",{staticClass:"good-title"},[t._v(t._s(t.showVideo.goods.title))]),t._v(" "),o("p",{staticStyle:{display:"flex"}},[o("span",{staticClass:"price"},[t._v("¥"+t._s(t.showVideo.goods.price))]),t._v(" "),o("span",{staticClass:"old-price"},[t._v("¥"+t._s(t.showVideo.goods.market_price))])])]),t._v(" "),o("i",{staticClass:"iconfont icon-fontclass-gouwuche"})])]):t._e(),t._v(" "),1==t.comment_open?o("div",{staticClass:"discuss-list-box",on:{mouseout:t.mouseout,mouseover:t.mouseover,scroll:t.commentScroll}},t._l(t.commentlist,(function(e,n){return o("div",{staticClass:"discuss-item-box"},[o("div",{staticClass:"member-box"},[o("div",{staticClass:"member-box-left"},[o("img",{staticClass:"actor",attrs:{src:e.head_image,alt:""}}),t._v(" "),o("div",{staticClass:"member-name-box"},[o("p",{staticClass:"member-name"},[t._v(t._s(e.nick_name))]),t._v(" "),o("div",{staticClass:"create-time"},[t._v(t._s(e.created_at))])])])]),t._v(" "),o("div",{staticClass:"discuss-desc"},[t._v("\n "+t._s(e.content)+"\n ")]),t._v(" "),o("div",{staticClass:"discuss-item-bottom"},[o("div",{staticClass:"like-box",on:{click:function(o){return o.stopPropagation(),t.clickLikeItem(n,"",e.is_support)}}},[e.is_support?t._e():o("i",{staticClass:"iconfont icon-bc_like_normal"}),e.is_support?o("i",{staticClass:"iconfont icon-zb_all_like"}):t._e(),t._v(" "),o("span",[t._v(t._s(e.support_num))])]),t._v(" "),o("div",{staticClass:"share-box",on:{click:function(o){return o.stopPropagation(),t.replyIt(e,"",n)}}},[o("i",{staticClass:"iconfont icon-fontclass-pinglun2"}),o("span",{staticStyle:{"margin-left":"5px"}},[t._v("回复")])]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:1==e.can_del,expression:"item.can_del == 1"}],staticClass:"share-box"},[o("i",{staticClass:"iconfont icon-fontclass-shanchu",on:{click:function(e){return e.stopPropagation(),t.delComment(n,-1)}}})])]),t._v(" "),e.reply_num?o("div",{staticClass:"sub-discuss-box"},[t._l(e.append_arr,(function(r,d){return o("div",{staticClass:"sub-discuss-item"},[o("p",{staticClass:"text-discuss"},[t._v(t._s(r.nick_name)+" "),r.reply_name?o("i",{staticClass:"iconfont icon-member_look"}):t._e(),t._v(" "+t._s(r.reply_name)+":"+t._s(r.content))]),t._v(" "),o("div",{staticClass:"discuss-item-bottom"},[o("div",{staticClass:"like-box",on:{click:function(e){return e.stopPropagation(),t.clickLikeItem(n,d,r.is_support)}}},[r.is_support?t._e():o("i",{staticClass:"iconfont icon-bc_like_normal"}),r.is_support?o("i",{staticClass:"iconfont icon-zb_all_like"}):t._e(),t._v(" "),o("span",[t._v(t._s(r.support_num))])]),t._v(" "),o("div",{staticClass:"share-box",on:{click:function(o){return o.stopPropagation(),t.replyIt(e,r,n)}}},[o("i",{staticClass:"iconfont icon-fontclass-pinglun2"}),o("span",{staticStyle:{"margin-left":"5px"}},[t._v("回复")])]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:1==r.can_del,expression:"itemChild.can_del == 1"}],staticClass:"share-box"},[o("i",{staticClass:"iconfont icon-fontclass-shanchu",on:{click:function(e){return e.stopPropagation(),t.delComment(n,d)}}})])])])})),t._v(" "),e.append_arr&&e.append_arr.length