1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-697b3032"],{5037:function(i,t,e){"use strict";e.r(t);var n=function(){var i=this,t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"contan"},[t.isShow?n("iframe",{ref:"iframe",attrs:{src:t.url,width:t.iframeWidth,height:t.iframeHeight,frameborder:"0",allowfullscreen:"true"}}):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isResizing,expression:"isResizing"}],staticClass:"iframeDiv"}),t._v(" "),t.showVideo?n("videoView",{attrs:{docY:t.docY,videoSrc:t.videoSrc},on:{closeVideo:function(i){t.showVideo=!1},isResizing:function(t){i.isResizing=t}}}):t._e()],1)},o=[],s=e("0f17"),r={components:{videoView:s["a"]},data:function(){return{url:"",h:"",w:"",y:130,docY:"",isShow:!1,showVideo:!1,isResizing:!1,src:""}},mounted:function(){this.initSize(),window.addEventListener("resize",this.resizeWindow),this.url=this.$route.query.url,this.isShow=!0},methods:{initSize:function(){this.docY=document.documentElement.clientHeight||document.body.clientHeight,this.h=this.docY-this.y,this.w=document.documentElement.clientWidth-40,this.x=210},resizeWindow:function(){var i=this;this.isShow&&(this.isShow=!1,this.initSize(),this.$nextTick((function(t){i.isShow=!0})))}},computed:{iframeWidth:function(){return this.w+"px"},iframeHeight:function(){return this.h-30+"px"},videoSrc:function(){return this.src}},watch:{isShow:function(i){var t=this;i&&this.$nextTick((function(i){var e=t.$refs.iframe,n=t.$refs.iframe.contentWindow;console.log(e),setTimeout((function(i){var e=n.document.querySelector("#mainFrame");e.contentWindow.document.addEventListener("click",(function(i){var e=i.composedPath&&i.composedPath()||i.path||[];if(e.length>0)for(var n in e){var o,s;if(null!==(o=e[n])&&void 0!==o&&o.getAttribute&&null!==(s=e[n])&&void 0!==s&&s.getAttribute("title")){console.log("打开视频链接",i.path[n].getAttribute("title")),t.src=i.path[n].getAttribute("title"),t.showVideo=!0;break}}else t.$message.error("该浏览器不支持,请更换或升级chrome浏览器")}),!0)}),500)}))}}},c=r,h=(e("a093"),e("2877")),u=Object(h["a"])(c,n,o,!1,null,"08bba540",null);t["default"]=u.exports},a093:function(i,t,e){"use strict";e("d170")},d170:function(i,t,e){}}]);
|